My script is asking for password
Hi guys
I am trying to automatically download files and delete them after the download
But when i run it keeps asking me for password
There is no password on the sftp server and it works with Winscp client
My script looks like this:
# Connect
open sftp://Username:@Servername/ -hostkey="ecdsa-sha2 key"
# Change remote directory
cd path-to-remote
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get -delete *.* path-to-local-machine
# Disconnect
close
# Exit WinSCP
exit
I am trying to automatically download files and delete them after the download
But when i run it keeps asking me for password
There is no password on the sftp server and it works with Winscp client
My script looks like this:
# Connect
open sftp://Username:@Servername/ -hostkey="ecdsa-sha2 key"
# Change remote directory
cd path-to-remote
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get -delete *.* path-to-local-machine
# Disconnect
close
# Exit WinSCP
exit