Topic "Host key automatically copy and press yes"

Author Message
dragnor
[View user's profile]

Joined: 2016-05-30
Posts: 1
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?

Code:

# 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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please start by reading "Verifying the Host Key ... in Script:
https://winscp.net/eng/docs/scripting#hostkey
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License