Customer updated Host server resulting in new host key

Advertisement

Jtomalewski
Guest

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
"C:\program files (x86)\winscp\winscp.com" /command "option confirm off" "open username@hostname -privatekey=privatekey.ppk"
Output is
confirm      off
searching for host...
connecting to host...
Server's host key did not match the signature supplied.
I've tried adding the -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.

Description: Screenshot of error

2021-02-11 09_05_35-2021_02_11_09_04_01_pghwrkpv300.agility.prod.nhsinc.net_Remote_Desktop_Connectio.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,283
Location:
Prague, Czechia

Re: Customer updated Host server resulting in new host key

What kind of server is that? What kind of upgrade was it?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum