Hi,
I am using the version 4.2.7 on Windows XP SP3.
I am try to run the following command.
"C:\Program Files\WinSCP\winscp.com" usr:pass@server /hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" /console /command "Option batch abort" "cd /home/internal/test" "Put -delete ""c:\temp\File1.pdf""" "Put -delete ""c:\temp\File1.csv""" "Put -delete ""c:\temp\File1.rdy""" "close" "exit"
I have the following output:
C:\>"C:\Program Files\WinSCP\winscp.com" usr:pass@server /hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" /console /command "Option batch abort" "cd /home/internal/test" "Put -delete ""c:\temp\File1.pdf""" "Put -delete ""c:\temp\File1.csv""" "Put -delete ""c:\temp\File1.rdy""" "close" "exit"
Searching for host...
Connecting to host...
Authenticating...
The server's host key was not found in the cache. You have no guarantee that the
server is the computer you think it is.
The server's dss key fingerprint is:
ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, C(a)ncel, (C)opy Key:
Is there a way to automatically accept it ?
I've tried the option bellow. But instead of continuing Cancel is chosen.
C:\>"C:\Program Files\WinSCP\winscp.com" /console /command "Option batch continue" "open sftp://usr:pass@server -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "cd /home/internal/test" "Put -delete ""c:\temp\File1.pdf""" "Put -delete ""c:\temp\File1.csv""" "Put -delete ""c:\temp\File1.rdy""" "close" "exit"
batch continue
Searching for host...
Connecting to host...
Authenticating...
The server's host key was not found in the cache. You have no guarantee that the
server is the computer you think it is.
The server's dss key fingerprint is:
ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Authentication failed.
No session.
No session.
No session.
No session.
No session.
Many thanks