Host key does not match

Advertisement

kibs1221
Joined:
Posts:
2
Location:
18032

Host key does not match

My log shows the correct host key then shows another one where I do not know where it is coming from??
Host key fingerprint is:
. 2026-04-02 14:35:38.189 Host key fingerprint is:
. 2026-04-02 14:35:38.192 ssh-rsa 4096 SHA256:ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0
< 2026-04-02 14:35:38.195 Script: Authenticating...
. 2026-04-02 14:35:38.198 Host key does not match configured key fingerprint ssh-rsa 2048 3jr8XXVhHnCgbIENSj0VFK0I8nMwoTOjiaWTCiY/zNU
. 2026-04-02 14:35:38.201 Attempt to close connection due to fatal exception:
* 2026-04-02 14:35:38.204 Host key fingerprint is ssh-rsa 4096 ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0.
* 2026-04-02 14:35:38.206 (Exception) **Host key does not match configured key fingerprint "ssh-rsa 2048 3jr8XXVhHnCgbIENSj0VFK0I8nMwoTOjiaWTCiY/zNU"!**
. 2026-04-02 14:35:38.209 Closing connection.
< 2026-04-02 14:35:38.214 Script: Host key does not match configured key fingerprint "ssh-rsa 2048 3jr8XXVhHnCgbIENSj0VFK0I8nMwoTOjiaWTCiY/zNU"!
< 2026-04-02 14:35:38.216 Host key fingerprint is ssh-rsa 4096 ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0.
< 2026-04-02 14:35:38.219 Authentication failed.
The correct one is the ssh-rsa 4096 SHA256:ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0
This is my text file -
open sftp://sftp-jefferson:FiYvSbdTKQ4PGDNm7Nrp@sftp.siftwell.ai/ -hostkey="ssh-rsa 4096 ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0"

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,803
Location:
Prague, Czechia

Re: Host key does not match

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

kibs1221
Joined:
Posts:
2
Location:
18032

i have attached a batch log

i have attached a batch log
  • job_log.txt (159.25 KB, Private file)
Description: attached a batch job log with error

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
42,803
Location:
Prague, Czechia

Re: i have attached a batch log

The log file you have posted contains logs of many sessions to the same server. Each log showing a different host key provided in the batch file. And some of the sessions actually do succeed:
> 2026-04-02 15:36:56.539 Script: open sftp://sftp-jefferson:***@sftp.siftwell.ai/ -hostkey="ssh-rsa 4096 ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0"
...
. 2026-04-02 15:36:56.728 Have a known host key of type rsa2
. 2026-04-02 15:36:56.758 Doing ECDH key exchange with curve Curve25519, using hash SHA-256
. 2026-04-02 15:36:56.934 Host key fingerprint is:
. 2026-04-02 15:36:56.937 ssh-rsa 4096 SHA256:ALNmZ9wqf4E3z0rPj5GIuqzsE/KlPsVonq4LFx8Q7D0
< 2026-04-02 15:36:56.939 Script: Authenticating...
. 2026-04-02 15:36:56.942 Host key matches configured key fingerprint

Reply with quote

Advertisement

You can post new topics in this forum