14th May 2024

SSH Configuration on Cisco Router

In this article, we will write to configure SSH on the Cisco Router. You can configure it by following the settings below.

Hostname

If you want to configure the SSH on Cisco Router, firstly you must give a hostname to the router.

Router#configure terminal
Router (config)#hostname  R1
R1#

Domain name

You must give a domain name.

R1#configure terminal
R1(config)#ip domain-name systemconf.com

SSH connection

You must create an encrypted key to make the SSH connection.

R1(config)#crypto key generate rsa
How many bits in the modulus [512] ?

This warning asks how many bits to use the crypto key. It can take values between 360 and 2048, the default value is 512.

Crypto-key

The generated crypto-key can be deleted at any time.

R1(config)#crypto key zeroize rsa

Username and password

Create a username and password

R1(config)#username admin password admin

Telnet or ssh

Set input method only telnet, only ssh or both.

R1(config)#line vty 0 4
R1(config)#login local

Previous username and password

Indicates the previously created username and password, because the user is created in local.

R1(config)#transport input {ssh | telnet | all}

Indicates the connection method.

SSH version

If your router support SSH, you can change the SSH version.

R1(config)# ip ssh version { 1 | 2 }

Response time

When ssh connection to the router, the user’s response time can be specified.

R1(config)#ip ssh time-out 30

Username and password must be entered within 30 seconds.

Connection unsuccessful

It can be specified how many unsuccessful attempts to break the connection.

R1(config)#ip ssh authentcation-retries 4

After this command, the user is allowed to try 4 times to enter, This value can be changed between 0-5 and the default value is 3.

LEARN MORE  What is a Router? What does it do?

Ssh connection

To make an ssh connection from one router to another router,

R1#ssh -l <user name> <ip >

 

Leave a Reply

Your email address will not be published. Required fields are marked *