By default SSH is disabled on Cisco routers, let's see how to configure it step by step.
First we need to set up an admin account on the router:
Router1(config)#username admin privilege 15 passwword P@ssw0rd
Next we will configure SSH service on the router:
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip domain-name soulsphere.net
Router1(config)#crypto key generate rsa
The name for the keys will be: Router1.soulsphere.net
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 : 1024
Generating RSA keys ...
Jun 27 15:04:15: %SSH-5-ENABLED: SSH 1.5 has been enabled
Router1(config)#ip ssh time-out 120
Router1(config)#ip ssh authentication-retries 4
SSH became available in Cisco's IOS, starting with release 12.1(1)T. However, only versions of IOS that support IPSec (DES or 3DES) encryption include SSH support.
If you're working with version 2 of SSH which is far more secure, you can switch the service to work only on version 2:
Router1(config)#ip ssh version 2