Cisco SSH

Here is how to setup SSH on a Cisco Device

ip domain-name contoso.com
This sets the domain name.

hostname Contoso-R1
This sets the domain name.

crypto key generate rsa module 1024
This creates the RSA keys with a size of 1024 bits (You can specify between 512 and 2048).

ip ssh time-out 60
ip ssh authentication-retries 2
Set timeout to 60 seconds and only allow 2 retries

ip ssh version 2
Tells device to use SSH V2 which provides some better features than V1

line vty 0 15
exec-timeout 60
This sets the session to timeout after 60 seconds of inactivity.

transport input ssh
This sets the vty lines to only allow SSH.

login local
This tells the device to use the local username and password.

username cisco password 0 cisco
Sets the username and password to cisco

Cisco SSH Commands





ssh -l cisco 10.1.7.1
This uses the username cisco and will then require the password we set.

Cisco SSH Commands




SSH Banner table