Authentication: Host key does not match configured key

Advertisement

Vann_the_Red
Joined:
Posts:
27
Location:
NC, USA

Authentication: Host key does not match configured key

Good morning, all! Hope all are well.

I have a script which used to work but has stopped. The logged error is **Host key does not match configured key. I can connect using the GUI tool. The session URL was pulled today from the GUI.

Looking at the log, I notice an interesting pattern. The host key reproduced in the log looks like:
"ssh-ed25519 256 nn:nn:nX:nn:nn:nn:xn:nn:xn:xx:nx:nn:xx:nn:xn:nx xxxxnx/nxnxnnnnxnnxn/xxxnnnxxxxxxxxxxxnxx=" where n is a number and x is an alphabetic character.

The configured key, however, is in the format, "ssh-ed25519-xxxxnxFnxnxnnnnxnnxnFxxxnnnxxxxxxxxxxxnxx="

The string matches between the two, but there are "F" instead of "/" and the "nn:nn:nx:nn:nn:nn:xn:nn:xn:xx:nx:nn:xx:nn:xn:nx" is omitted.

I assume this means I have misconfigured something. Any guidance is appreciated.

Regards,

Aaron

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

Re: Authentication: Host key does not match configured key

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

Note that the host key in question is a public key. So there's no need to obfuscate it. You can publish it as is.

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

martin
Site Admin
martin avatar

Re: Authentication: Host key does not match configured key

So where did you get the host key with F's from? Can you post a screenshot of the source?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

I do not understand.

Last few lines are these:

. 2020-03-24 11:16:09.330 Host key does not match configured key fingerprint ssh-ed25519-eYkp9xFlp1NydcGv3tpSzFZfO854eNiKSXUS1EJ1cTM=
. 2020-03-24 11:16:09.330 Attempt to close connection due to fatal exception:
* 2020-03-24 11:16:09.330 Host key fingerprint is ssh-ed25519 255 eYkp9x/lp1NydcGv3tpSz/ZfO854eNiKSXUS1EJ1cTM=.
* 2020-03-24 11:16:09.330 (Exception) **Host key does not match configured key fingerprint "ssh-ed25519-eYkp9xFlp1NydcGv3tpSzFZfO854eNiKSXUS1EJ1cTM="!**
. 2020-03-24 11:16:09.330 Closing connection.

The third to last line ("Host key fingerprint is") contains the slashes.
The F's are in the "Host key does not match configured key fingerprint", which contains host key from your script. I'm asking where did you take the host key format with F's from.

Reply with quote

Vann_the_Red
Joined:
Posts:
27
Location:
NC, USA

Martin,
Ah, I understand. I had copied it over from the session URL generated in the GUI. I noticed today while confirming this during a manual download that the session URL did not match. I copied it again and the script is connected. I'm not sure what happened, though I'm sure the error was mine, but it appears to be fixed. Thank you again for all of your assistance.
Regards,
VtR

Reply with quote

Advertisement

You can post new topics in this forum