Question

Difficulty: MediumSSH Secure Remote Access Configuration and Verification

An administrator on a campus core switch named Core-SW1 is configuring SSH for secure management access. The administrator sets a hostname of Core-SW1 and attempts to run the command `crypto key generate rsa`, but receives the system message: `% Please define a domain-name first.` Which configuration command must be entered in global configuration mode to resolve this issue and allow key generation?

  1. ip domain-name example.comAnswer
  2. B
    ip ssh version 2
  3. C
    transport input ssh
  4. D
    username admin secret Cisco12345

Answer

Configure an IP domain name using the global configuration command `ip domain-name example.com`.
Generating an RSA key pair on a Cisco IOS device requires both a non-default hostname and an IP domain name. The device uses these two parameters to form the fully qualified domain name (FQDN) that names the key pair. Executing `ip domain-name example.com` supplies the missing parameter so that `crypto key generate rsa` can run successfully.

Step-by-Step Solution

1
Identify the prerequisite requirement for Cisco IOS RSA key pair generation.
Cisco IOS derives the default name of the RSA key pair from the device hostname appended with the IP domain name (e.g., Core-SW1.example.com).
Without an IP domain name explicitly configured, the router or switch cannot form the key pair name.
2
Select the proper command to define the IP domain name.
Executing `ip domain-name example.com` in global configuration mode defines the domain name context.
This satisfies the missing prerequisite indicated by the CLI prompt '% Please define a domain-name first.'

Key Concept

SSH Prerequisite Configuration and RSA Key Pair Naming
Estimated Time:1m 0s
Rate this question