Help with SFTP : error “Host key verification failed”
Posted: Tue Jun 06, 2023 7:34 pm
Hi All
I’m try to connect via SFTP to a supplier’s server , but I receive the error “Host key verification failed” ;
The supplier told me that “..doing connection tests with your user , the problem described does not occur, there are no keys activated on the server side ..”
I tryed also to run “ssh-keygen -R [hostname|IP address]” , did not solved the problem
This is the log that i collected
sftp -vvv -b /tmp/sftp/DFT_SFTPSRV_SFTP myuser@sftp.SFTPSRV.com
OpenSSH_6.9p1, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to sftp.SFTPSRV.it [YYY.WW.HHH.ZZ] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0
debug1: match: OpenSSH_8.0 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to sftp.SFTPSRV.it:22 as 'myuser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: curve25519-sha256@libssh.xxxxxxxxxx
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-zzzzzzzzzz
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: curve25519-sha256,curve25519-yyyyyyyy
debug2: kex_parse_kexinit: rsa-sha2-512,rsa-sha2-256,kkkkkkkk
debug2: kex_parse_kexinit: aes256-gcm@openssh.com,chacha20-xxxxxx
debug2: kex_parse_kexinit: aes256-gcm@openssh.jjjjj
debug2: kex_parse_kexinit: hmac-sha2-256-etm@openssh.com,hhhhh
debug2: kex_parse_kexinit: hmac-sha2-256-etm@openssh.iiiiii
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ddddddd
Host key verification failed.
Connection closed
Which could be the problem ?
Thanks in advance
I’m try to connect via SFTP to a supplier’s server , but I receive the error “Host key verification failed” ;
The supplier told me that “..doing connection tests with your user , the problem described does not occur, there are no keys activated on the server side ..”
I tryed also to run “ssh-keygen -R [hostname|IP address]” , did not solved the problem
This is the log that i collected
sftp -vvv -b /tmp/sftp/DFT_SFTPSRV_SFTP myuser@sftp.SFTPSRV.com
OpenSSH_6.9p1, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to sftp.SFTPSRV.it [YYY.WW.HHH.ZZ] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/USER/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0
debug1: match: OpenSSH_8.0 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to sftp.SFTPSRV.it:22 as 'myuser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: curve25519-sha256@libssh.xxxxxxxxxx
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-zzzzzzzzzz
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: curve25519-sha256,curve25519-yyyyyyyy
debug2: kex_parse_kexinit: rsa-sha2-512,rsa-sha2-256,kkkkkkkk
debug2: kex_parse_kexinit: aes256-gcm@openssh.com,chacha20-xxxxxx
debug2: kex_parse_kexinit: aes256-gcm@openssh.jjjjj
debug2: kex_parse_kexinit: hmac-sha2-256-etm@openssh.com,hhhhh
debug2: kex_parse_kexinit: hmac-sha2-256-etm@openssh.iiiiii
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ddddddd
Host key verification failed.
Connection closed
Which could be the problem ?
Thanks in advance