I've configured the following on my IOS XE device.

ip ssh rsa keypair-name my-4096rsa-ssh-key
ip ssh version 2
ip ssh server algorithm mac hmac-sha2-512 hmac-sha2-256
ip ssh server algorithm encryption aes256-gcm aes256-ctr
ip ssh server algorithm kex ecdh-sha2-nistp521 ecdh-sha2-nistp384
ip ssh server algorithm hostkey rsa-sha2-512 rsa-sha2-256
ip ssh server algorithm authentication keyboard
ip ssh server algorithm publickey ecdsa-sha2-nistp521 ecdsa-sha2-nistp384

When I capture the traffic using Wireshark I see that the KEX Host key type is ssh-rsa.

Wireshark Capture highlighting KEX host key type

Since the only configured algorithms configured for Hostkey are rsa-sha2-512 and rsa-sha2-256 I'm curious why this is showing. This hostkey type is not configured and before I dig in with TAC I wanted to see if anyone had any ideas why this would be the case.

Thanks for any insight, Tim

  • This looks like a product support question for Cisco.
    – schroeder
    Feb 22, 2022 at 9:27
  • The newer rsa-sha2 algorithms re-use the key format, and type, of ssh-rsa; see RFC8332 section 3 Feb 23, 2022 at 1:42

1 Answer 1


ssh-rsa can mean multiple things in SSH2.

ssh-rsa as public key algorithm

The public key algorithm "ssh-rsa" is deprecated, which is used as part of host key verification and for user authentication, because signing and verification is performed with a SHA1 hash which is insecure.

ssh-rsa as public key format

The public key format "ssh-rsa" is not related to SHA1. This format is used for the public host key and for the client public keys. The ssh-rsa public key format is not deprecated

The ssh-rsa public key format is secure as long as you choose a sufficient key length >= 3096bits

Note: ssh-rsa keys with 3096bits are the default key settings from OpenSSH. So this should be a good recommendation.

Explanation of the Wireshark dump

With the command

ip ssh server algorithm hostkey rsa-sha2-512 rsa-sha2-256

only the public key algorithms are configured. The host key format is not affected.

During the host key verification, the public key is sent to the client. The mentioned ssh-rsa in the Host key type fild is the public key format and not the public key algorithm.

In your example, you are generating a RSA key (ssh-rsa):

ip ssh rsa keypair-name my-4096rsa-ssh-key

This is the reason, why the Host key type is ssh-rsa.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .