Server host key hash different between RHEL 5 and RHEL 7
Issue
- RSA host keys were migrated over from a RHEL 5 to RHEL 7 server. Clients (running on non linux) attempting to connect using
SFTPare shown different host keys:
RHEL 5 server:
sftp -vv -o port=60022 user@server
OpenSSH_7.5p1, OpenSSL 1.0.2k 26 Jan 2017
...
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:GC0amEry8lfS1MkTxX/oCkn3LI+FAt9yJxexxxxYYYY
debug1: Host '[server]:60022' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:101
debug2: bits set: 1491/3072
RHEL 7 server:
sftp -vv -o port=60022 user@server
OpenSSH_7.5p1, OpenSSL 1.0.2k 26 Jan 2017
...
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:Se1TAx02GaaF1EDKbrbqKKXX+8Jawd+VT5JxxxxYYYY
Environment
- Red Hat Enterprise Linux 5.x
- Red Hat Enterprise Linux 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.