Hope this helps. Thanks, Chris Fitzgerald Sr. Software Developer - Information Technology, Prime Inc. 2740 North Mayfair Avenue Springfield, Missouri 65803-5084 USA Phone: 1-417-521-3295 Fax: 1-417-521-6863 From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of John Place 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, From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Gerald Magnuson We use expect scripts to handle getting the password entered.
From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
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 Email: John.Place@xxxxxxxxxxxxxxx From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Michael Mayer-Oakes <mmayer-oakes@xxxxxxxxxxx> 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 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 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 Email: John.Place@xxxxxxxxxxxxxxx From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Michael Mayer-Oakes <mmayer-oakes@xxxxxxxxxxx> 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 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 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). 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? -- Thank You, This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please reply and follow with its deletion. The views expressed in this correspondence may not reflect the views of Prime Inc 2740 N Mayfair Ave Springfield, MO 65803 |
#!/usr/local/bin/expect -f set timeout 20 spawn sftp $env(SSH_USER)@$env(SSH_HOST) expect { default {exit 2} "continue connecting (yes/no)?" {send "yes\n"; exp_continue} "assword:" {send "$env(SSH_PASS)\n"; exp_continue} "sftp>" } send "Get $env(SSH_FROM_FILE) $env(SSH_TO_FILE).csv\n" expect { default {exit 2} "not found" {exit 3} "sftp>" } send "quit\n" exit 0
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi