R1(config)#ip domain-name example.com
#configure a domain name of your choice
R1(config)#crypto key generate rsa
#This is used to generate RSA key pairs for the device.
It will prompt as below to define the size of the key in bits. in this example i have given 1024
R1(config)#ip ssh version 2
#enable SSH version 2
R1(config)#username cisco password cisco
#create local username and password
R1(config)#enable password cisco
#create enable password
Configure the below to allow SSH access to the device
R1(config)#line vty 0 4
R1(config-line)#transport input ssh #allow only SSH session
R1(config-line)#login local #use the local credentials configured
0 Comments