Tuesday 27 May 2014

HOW TO SETTING UP SECURE SHELL (SSH) ON A CISCO ROUTERS


                              Instead of Telnet, you can use Secure Shell, which creates a more secure session than the Telnet application that uses an unencrypted data
stream. Secure Shell (SSH) uses encryption keys to send data so that your username and password are not sent in the clear.
Here are the steps to setting up SSH:

1. Set your hostname:
Router(config)#hostname Todd

2. Set the domain name (both the hostname and domain name are required for the encryption keys to be generated):
Todd(config)#ip domain-name Lammle.com

3. Set the username to allow SSH client access
Todd(config)#username Todd password Lammle

4. Generate the encryption keys for securing the session:
Todd(config)#crypto key generate rsa general-keys modulus ?
<360-2048> size of the key modulus [360-2048]
Todd(config)#crypto key generate rsa general-keys modulus 1024
The name for the keys will be: Todd.Lammle.com
% The key modulus size is 1024 bits
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
*June 24 19:25:30.035: %SSH-5-ENABLED: SSH 1.99 has been enabled

5. Enable SSH version 2 on the router; although this isn’t mandatory it is highly suggested:
Todd(config)#ssh version 2

6. Connect to the VTY lines of the router:
Todd(config)#line vty 0 1180

7. Last, configure SSH and then Telnet as access protocols:
Todd(config-line)#transport input ssh telnet
                     If you do not use the keyword telnet at the end of the command string, then only SSH will work on the router. I am not suggesting you use either
way, but just understand that SSH is more secure than Telnet.