Why does Cisco IOS require domain-name to be set before SSH keys can be generated?

You do not need to set "ip domain-name" or "hostname" before creating a key. They are required if you don't name it yourself. Use the following command to name it yourself:

 crypto key generate rsa general-keys label MYKEYNAME

More info here:

http://cisco-network.com/hands-on/advanced-ssh-settings-for-cisco-ios/


Sorry Julian but Joseph is right

Before issuing this command, ensure your router has a host name and IP domain name configured (with the hostname and ip domain-name commands). You will be unable to complete the crypto key generate rsa command without a host name and IP domain name. (This is not true only when you generate a named-key-pair.)

source: http://www.cisco.com/en/US/docs/ios/12_2t/12_2t8/feature/guide/ftmltkey.html under the command reference section

Tags:

Ssh