How to enable SSH on router Switch on GNS3 | Configuring Secure Shell Cisco

CLI configuration of SSH on Cisco Router/Switch

Secure Shell (SSH) is a protocol like telnet which provides you a secure remote connection to network devices. Telnet communication is in clear text and a hacker can capture your login information and other contents using a packet sniffer. Whereas SSH creates an encrypted communications tunnel between you and the router. There are two types of SSH i.e.
  • SSh version 1
  • SSH version 2

Now a day’s everyone is using version 2 because it is more secure and have better encryption algorithm.
In this GNS3 lab I will show you that how you can configure your router or switch for SSH access, you need a k9(crypto) IOS image for SSH configuration. I have used 3725 IOS you can download it from this link: k9(crypto) Cisco IOS image

Lab Objective/Task:
1.       Configure SSH communication on L3_Switch.

The topology is simple and our task is to configure SSH on L3_switch, we need the following steps on L3_Switch for accomplish this:
Configure the hostname:
Router#config t
Router#(config)hostname L3_Switch
Telnet does required only the password where as SSH uses both username and password. Therefore we need to create a user for SSH.
L3_Switch#(config) aaa new-model
L3_Switch#(config) username admin secret 5 cisco (“secret” uses the MD5 hash in running config, where 5 Specifies a HIDDEN secret will follow and Cisco is the hidden password)

Configure the DNS domain:
L3_Switch#(config)ip domain name
Enable SSH:
L3_Switch#(config) crypto key generate rsa

How many bits in the modulus [512]:
(If you can want to enable 512 bits encryption then press enter otherwise you can type the other values like 1024 etc.)
L3_Switch#(config)#ip ssh version 2
L3_Switch# (config)#line vty 0 4
L3_Switch# transport input SSH
L3_Switch# (config-line)#login local

You can test SSH configuration from R2 by accessing L3_switch by SSH with following command:

ssh -l admin

Cisco 3725 IOS Image Free Download for GNS3

Router IOS image with Switching Functionality:

Cisco 3700 series routers can provide you the different services like Security, Voice, IP Telephony, voice mail, Video and Content Networking in your network.

Key features for the Cisco 3725 include:

  •          You can  use16-port EtherSwitch NM with 3725 which can provide you the switching functionality.
  •        Support for all major WAN protocols and media: leased line, Frame Relay, ISDN, X.25, ATM, fractional T1/E1, T1/E1, xDSL, T3/E3, HSSI
  •      You can enable the SSH because of it's k9(crypto) feature. How to enable SSH on your router in GNS3

You can download 3725 gns3 router IOS  from here and play it on GNS3 for learning purposes. You can perform different routing labs as well as switching labs with this IOS image.