Cisco iOS Basics: SSH

If you want a secure connection to your Cisco router you’ll be setting up SSH connection instead of Telnet.

Here is simple how to for enabling SSH access to your Cisco router

If you haven’t already, set a name for your router

Router(config)#hostname Zeljko
Zeljko(config)#
Zeljko(config)#ip domain-name zeljko.medic
Zeljko(config)#username zeljko password medic
Zeljko(config)#crypto key generate rsa
The name for the keys will be: Zeljko.zeljko.medic
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable…[OK]

Zeljko(config)#ip ssh version 2
*o?u 1 1:9:31.310:  %SSH-5-ENABLED: SSH 1.99 has been enabled
Zeljko(config)#line vty 0 15
Zeljko(config-line)#transport input ssh

To the last command (transport input ssh) you can add telnet at the end (transport input ssh telnet) otherwise connection will be possible only via SSH

CiscoSSH

Disclaimer