Secure Shell Version 2 Support Configuring the Cisco IOS SSH Client to Perform Server Authentication Command or Action Purpose Step 4 ip domain name name Example: host1(config)# ip domain name name1 Defines a default domain name that the Cisco software uses to complete unqualified hostnames. Step 5 crypto key generate rsa Example: host1(config)# crypto key generate rsa Generates RSA key pairs. Step 6 ip ssh pubkey-chain Example: host1(config)# ip ssh pubkey-chain Configures public keys for user and server authentication on the SSH server and enters public-key configuration mode. Step 7 server server-name Example:
host1(conf-ssh-pubkey)# server server1 Enables the SSH server for public-key authentication on the device and enters public-key server configuration mode. Step 8 key-string Example: host1(conf-ssh-pubkey-server)# key-string Specifies the public-key of the remote peer and enters public key data configuration mode. Note You can obtain the public key value from an open SSH client; that is, from the .ssh/id rsa.pub file. _ Step 9 exit Example: host1(conf-ssh-pubkey-data)# exit Exits public-key data configuration mode and enters public-key server configuration mode. Step 10 key-hash key-type key-name Example:
host1(conf-ssh-pubkey-server)# key-hash ssh-rsa key1 or host1(conf-ssh-pubkey-server)# key-hash ssh-ed25519 DFEAF10390E560AEA745CCBA53E044FD (Optional) Specifies the SSH key type and version. • The key type can be either ssh-rsa or ssh-ed25519 for the configuration of private/public key pairs. • This step is optional only if the key-string command is configured. • You must configure either the key-string command or the key-hash command. Note You can use a hashing software to compute the hash of the public key string, or you can copy the hash value from another Cisco device.
Entering the public key data using the key-string command is the preferred way to enter the public key data for the first time. Secure Shell Version 2 Support 10