SSH

SSH #

The following steps will be a basic guide on how to setup a CISCO device as a SSH client.

Configuring SSH #

  1. Connect to the device via console cable to do the following configurations.

  2. Configure the hostname of the device.

    hostname R1 
    
  3. Configure the DNS domain.

    ip domain-name exampledomain.com 
    
  4. Generate the RSA keys. You will be asked to specify the number of bits to use for the key in increments of 512. I recommend 1024 as the default value.

    crypto key generate rsa 
    
  5. Enable SSH transport on the VTY lines.

    1. Enter VTY line configuration.
      line vty 0 15
      
    2. Enable SSH on VTY lines.
      transport input ssh
      
  6. Listed below is a compelete configuration using PacketTracer on a Cisco router.

Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#ip domain-name exampledomain.com
R1(config)#crypto key generate rsa 
The name for the keys will be: R1.exampledomain.com
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]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

R1(config)#line vty 0 15
R1(config-line)#transport input ssh 
R1(config-line)#