Batch CL for sFTP with Password Authentication
Posted: Wed Mar 06, 2024 3:35 am
I received a new request to send files via sFTP to a new trading partner.
After copying a previous setup, and changing the scripts, I continue to get Permission Denied.
Key is in /home/skxftp/.ssh
- myftp.dachser.com,195.145.171.89 ecdsa-sha2-nistp256 AAAAE.......
The script is stored in /home/skxftp/Src/dac_sftp_script.sh
- #!/bin/sh
- export DISPLAY= SSH_ASKPASS=/QOpenSys/etc/Dac_password_script.sh
- printf "lcd /Home/Skxftp/Out/Dac/\ncd /data/edi/da00127976/in\nput *.csv\nquit\n" | sftp -vvv -oStrictHostKeyChecking=no
-oPasswordAuthentication=yes USER001@myftp.dachser.com
The password is stored in /QOpenSys/etc/Dac_password_script.sh
- #!/bin/sh
- printf PASSWORD001
I constantly get the read_passphrase: can't open /dev/tty: No such device or address!!!
This setup works well with other partners.
What should i be checking, or have the partner check?
Thanks in advance.
Chris
After copying a previous setup, and changing the scripts, I continue to get Permission Denied.
Key is in /home/skxftp/.ssh
- myftp.dachser.com,195.145.171.89 ecdsa-sha2-nistp256 AAAAE.......
The script is stored in /home/skxftp/Src/dac_sftp_script.sh
- #!/bin/sh
- export DISPLAY= SSH_ASKPASS=/QOpenSys/etc/Dac_password_script.sh
- printf "lcd /Home/Skxftp/Out/Dac/\ncd /data/edi/da00127976/in\nput *.csv\nquit\n" | sftp -vvv -oStrictHostKeyChecking=no
-oPasswordAuthentication=yes USER001@myftp.dachser.com
The password is stored in /QOpenSys/etc/Dac_password_script.sh
- #!/bin/sh
- printf PASSWORD001
I constantly get the read_passphrase: can't open /dev/tty: No such device or address!!!
This setup works well with other partners.
What should i be checking, or have the partner check?
Thanks in advance.
Chris