CCNA Exam Prep: Configuring RSA Key for SSH on Cisco Router

Generate RSA Key for SSH on Cisco Router

Question

Which configuration is needed to generate an RSA key for SSH on a router?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

To generate an RSA key for SSH on a Cisco router, the following configuration steps are required:

  1. Configure a hostname for the router: This can be done by entering the following command in global configuration mode:
php
hostname <name>

Replace <name> with the desired hostname for the router.

  1. Generate an RSA key pair: This can be done by entering the following command in global configuration mode:
vbnet
crypto key generate rsa

This command generates a key pair with a default modulus size of 1024 bits. To specify a different modulus size, use the following command instead:

php
crypto key generate rsa modulus <modulus-size>

Replace <modulus-size> with the desired modulus size, such as 2048 or 4096 bits.

  1. Configure SSH: This can be done by entering the following commands in global configuration mode:
php
ip ssh version 2 ip ssh time-out <seconds> ip ssh authentication-retries <num-retries>

The first command specifies that the router should use SSH version 2. The second and third commands specify the timeout and number of authentication retries for SSH sessions.

  1. Configure the VTY lines: This can be done by entering the following commands in global configuration mode:
python
line vty 0 4 transport input ssh

This command configures the VTY lines to accept SSH connections. The transport input ssh command restricts access to the VTY lines to SSH only.

Once these steps are completed, the router is configured to accept SSH connections using RSA authentication.