How to configure SSH in Cisco Devices?

SSH is a secure method for remote access it uses public-key cryptography to authenticate the remote computer and allow it to authenticate the user. Read more.. 

Open SSH is pretty default where it comes to remote administration in Linux and network device. 

To install SSH or Open SSH in Windows and Linux(Click here).

Step 1: If you have not configured IP on the switch then Configure It by the below command. 

Switch(config)# interface vlan 111
Switch(config-if)# ip address 192.168.0.53 255.255.255.0

Step 2: Set Hostname and domain Name.

interface vlan vlanid
Switch(config)# hostname SW1
SW1(config)#ip domain-name itblizz.local

Step 3: Generate RSA key for SSH.

SW1(config)#crypto key generate rsa
The name for the keys will be: SW1.itblizz.local
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 0 seconds)
Step 4: Configure SSH version: 
By default, the Cisco device enables SSH version 1. But it is recommended to change version 1 to version 2 because it is more secure and commonly used nowadays.

SW1(config)# ip ssh version 2


Step 5: Create the Username and password of SSH. Username is admin and password is cisco.

SW1(config)# username admin privilege 15 password cisco

Step 6: Setup the Line VTY.

SW1(config)#line vty 0 4
SW1(config-line)#transport input ssh
SW1(config-line)#login local


Step 7: Encrypt all text passwords for the user in running-config using the below command and save the configuration.
SW1(config)#service password-encryption
SW1(config)# do wr
Step 8: Verify SSH Access.

                                        

Post a Comment