Customer updated Host server resulting in new host key
We run a simple batch script using WinSCP to connect to our customer servers and pull files over using private/public key. Recently a customer ran updates in their environment resulting in a new hostkey. Going through the GUI I receive the prompt similar to below, and accept the new key.
https://winscp.net/eng/docs/message_host_key
When connecting through our commandline I receive the error "Server's host key did not match the signature supplied"
Command we're running
Output is
I've tried adding the
https://winscp.net/eng/docs/message_host_key
When connecting through our commandline I receive the error "Server's host key did not match the signature supplied"
Command we're running
"C:\program files (x86)\winscp\winscp.com" /command "option confirm off" "open username@hostname -privatekey=privatekey.ppk"
confirm off searching for host... connecting to host... Server's host key did not match the signature supplied.
-hostkey
switch into the open
command using every variation of -hostkey=*
or -hostkey=""ssh-rsa XXXXXXXXX""
. All of which results in the same error. How can I get past this issue.