Host key does not match configured key ssh-rsa
I can connect successfully to my Linux server using WinSCP GUI version 5.5.1 under Windows 7.
However I need to automate a few file transfers so I have to use WinSCP from command line (MSDOS style).
The structure of my command file is the following:
In this example I put
The auto-confirmation fails with the following messages:
For debugging purpose I tried to use
Can someone help?
Thank you.
However I need to automate a few file transfers so I have to use WinSCP from command line (MSDOS style).
The structure of my command file is the following:
WinSCP.exe /log=ftpcmd.log /command "option confirm off" "option batch continue" ^ "open sftp://<user>:<passw> @ftp.<hostname> -hostkey="ssh-rsa 2048 b7:d7:c0:65:a8:5e:a1:ef:11:91:db:98:3d:92:2a:2a"" ^ "put d:\timbrature\ 20140516.csv /home/timbr/timbrature/" ^ "exit"
<user>
<passw>
and <hostname>
in place of the real username, password and host names.
The auto-confirmation fails with the following messages:
I double checked the host key in the server boot data and it is correct and matches with the one which appears in the above log file.Host key does not match configured key ssh-rsa.
Asking user:
**Continue connecting to an unknown server and add its host key to a cache?**
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 rsa2 key fingerprint is:
ssh-rsa 2048 b7:d7:c0:65:a8:5e:a1:ef:11:91:db:98:3d:92:2a:2a
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel. ()
Attempt to close connection due to fatal exception:
Host key fingerprint is ssh-rsa 2048 b7:d7:c0:65:a8:5e:a1:ef:11:91:db:98:3d:92:2a:2a.
(Exception) Host key wasn't verified!
Closing connection.
Sending special code: 12
For debugging purpose I tried to use
-hostkey="*”
and it works. I can't understand what is wrong with the auto-confirmation.
Can someone help?
Thank you.