[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Question regarding sFTP



An alternative could be using “sshpass” which is available as an IBMiOSS RPM install.
https://www.redhat.com/sysadmin/ssh-automation-sshpass
https://ibm.github.io/ibmi-oss-resources/


Bryan

On Apr 26, 2021, at 11:03 AM, John Place <john.place@xxxxxxxxxxxxxxx> wrote:

Could you send me a sample script of how you use Expect with SFTP, I’m having a lot of trouble finding anything online….
 
--
Thank You,
John Place

284 Fuel Supply LLC
General Manager 
Direct Line: 563-468-5289
Cell: 563-529-0162
Email: John.Place@xxxxxxxxxxxxxxx
             
Notice:  Any agreement discussed or implied in this message is for discussion purposes only and may not be relied upon to bind the company.  Agreements are binding only when fully committed to writing and executed by authorized representatives of all the parties.  The information contained herein, while provided in good faith and believed to be accurate, is provided by 284 Fuel Supply, LLC and or Iowa 80 Group, Inc. and their affiliates as an accommodation to their readers for information purposes only, it is not guaranteed as to accuracy or completeness.  The information contained in this communication is confidential and is intended only for the use of the addressee. It is solely the property of 284 Fuel Supply and or Iowa 80 Group Inc. and their affiliates. Unauthorized use of this information, in whole or in part, is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication, including all attachments and any copies.
 
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Gerald Magnuson
Sent: Wednesday, November 11, 2020 10:37
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] Question regarding sFTP
 
We use expect scripts to handle getting the password entered.
 

 

Gerald Magnuson | Senior System I Admin

The Knapheide Manufacturing Company
1848 Westphalia Strasse // P.O. Box 7140 // Quincy, IL // 62305-7140
P: 217-592-5291 //  F: 217-592-5046 // www.knapheide.com
Facebook LinkedIn Instagram Twitter YouTube
 
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> 
Sent: Wednesday, November 11, 2020 10:20 AM
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] Question regarding sFTP
 

Thats the issue i dont have a way to supply the password, does that make sense?

Thank You,

John Place

284 Fuel Supply LLC
General Manager
Direct Line: 563-468-5289
Cell: 563-529-0162
 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Michael Mayer-Oakes <mmayer-oakes@xxxxxxxxxxx>
Sent: Wednesday, November 11, 2020 10:10:47 AM
To: 'FTPAPI/HTTPAPI mailing list' <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] Question regarding sFTP
 
What happens if run it manually as:
 
Sftp user@hostname
 
Then key in the password? Also what does site.url mean? As I understand it sftp format is basically:
 
Sftp (file) user@hostname:/path
 
Haven’t used password:user, so not familiar with that.
 
Michael Mayer-Oakes
Data Scientist
500 Crocker Drive. Vacaville, CA. 95688
Phone: 707-452-2868 | www.mariani.com
 
<image001.jpg>
 
Celebrating over 100 years of being your Global Supplier of Dried Fruits and Snacks.
 
Please consider the environment before printing this email.
 
 
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of John Place
Sent: Wednesday, November 11, 2020 8:01 AM
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] Question regarding sFTP
 
When I try to send the credentials via sftp command it errors out with an invalid host name...
 

Example:  sftp password:username@xxxxxxxx

This fails at the : after password

Thank You,

John Place

284 Fuel Supply LLC
General Manager
Direct Line: 563-468-5289
Cell: 563-529-0162
 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Michael Mayer-Oakes <mmayer-oakes@xxxxxxxxxxx>
Sent: Wednesday, November 11, 2020 9:45:34 AM
To: 'FTPAPI/HTTPAPI mailing list' <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] Question regarding sFTP
 
John-
 
What happens if you try it?
 
 
Michael Mayer-Oakes
Data Scientist
500 Crocker Drive. Vacaville, CA. 95688
Phone: 707-452-2868 | www.mariani.com
 
<image001.jpg>
 
Celebrating over 100 years of being your Global Supplier of Dried Fruits and Snacks.
 
Please consider the environment before printing this email.
 
 
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of John Place
Sent: Wednesday, November 11, 2020 7:14 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Ftpapi] Question regarding sFTP
 
I typically use private keys for connecting to sFTP servers via QSH, I simply send the private key along with the credentials and everything works fine.  Below is an example is use to get data from Platts (an oil market company the offers index pricing models).
 
<image002.png>
 
I have no trouble with this method, however I’m working with a new company and they too use sFTP however they don’t use key exchange.  I have a username and password and I can log into their site via SSH (see below) , there is nothing in the site yet I’m only testing if I can log it.  My question is can I use SSH in place of sFTP given there is no key exchange?
 
<image003.png>
 
--
Thank You,
John Place

284 Fuel Supply LLC
General Manager 
Direct Line: 563-468-5289
Cell: 563-529-0162
Email: John.Place@xxxxxxxxxxxxxxx
             
Notice:  Any agreement discussed or implied in this message is for discussion purposes only and may not be relied upon to bind the company.  Agreements are binding only when fully committed to writing and executed by authorized representatives of all the parties.  The information contained herein, while provided in good faith and believed to be accurate, is provided by 284 Fuel Supply, LLC and or Iowa 80 Group, Inc. and their affiliates as an accommodation to their readers for information purposes only, it is not guaranteed as to accuracy or completeness.  The information contained in this communication is confidential and is intended only for the use of the addressee. It is solely the property of 284 Fuel Supply and or Iowa 80 Group Inc. and their affiliates. Unauthorized use of this information, in whole or in part, is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication, including all attachments and any copies.
 
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi