Host key automatically copy and press yes
Hi, hopefully somebidy can help me with this.
I get a new data files on a SFTP server each night. Then i need to have a script that automatically download this data file.
I have this script now, but each time I need to press C to copy the host key and press Y to copy the file. How do I get around this?
I get a new data files on a SFTP server each night. Then i need to have a script that automatically download this data file.
I have this script now, but each time I need to press C to copy the host key and press Y to copy the file. How do I get around this?
# Connect open sftp://XXXXX:YYYYYYY@sftp-eu2.onbaseonline.com/" # Change remote directory cd /home/user/Outgoing # Force binary mode transfer option transfer binary # Download all files to the local directory I:\Dat\39AESTA\Data\Recall option confirm off get *.* I:\Dat\39AESTA\Data\Recall # Disconnect close # Exit WinSCP exit