How to Configure SSH (Secure Shell) on Cisco

What is SSH (Secure Shell)?

Secure Shell (SSH) is a protocol which provides a secure remote access connection to network devices. Communication between the client and server is encrypted in both SSH version 1 and SSH version 2. Implement SSH version 2 when possible because it uses a more enhanced security encryption algorithm.

Set Up an IOS Router or Switch as SSH Client

There are five steps required to enable SSH support on a Cisco IOS router:
  1. Configure the hostname command.
  2. Configure the DNS domain.
  3. Generate the SSH key to be used.
  4. Enable SSH transport support for the virtual type terminal (vtys).
  5. Create username and password.

Configuration of SSH
Configure Hostname.
Router(config)#hostname R1

Configure Domain Name
R1(config)#ip domain-name cisco.com

Generate RSA Key
R1(config)#crypto key generate rsa
It will ask for key module by default 512.
How many bits in the modulus [512]: 1024

Specify ssh version.
R1(config)#ip ssh version 2

Enable SSH transport support for the VTY
R1(config)#line vty 0 4
R1(config-line)#transport input ssh
R1(config-line)#login local

Create username and password
R1(config)#username admin password cisco

Now try to connect with Putty or Secure Srt.

Comments