ICND1: Connect to switch -Console, Telnet and SSH

To connect a switch to a PC to view console, do the following: (There is no other option initially except the console, but then you can set up SSH and Telnet

  1.  Connect DB9 to Cons port on router
  2. Connect Serial cable to PC, or via adapter if no serial cable
  3. Once you have putty working, create a management VLan:

en
conf t
vlan 100
int vlan 100
ip address 192.168.1.1 255.255.255.0

exit

int fa0/1
switchport mode access
switchport access vlan 100
exit

If you plug in a PC and configure the NIC with the correct IP, you should be able to ping.

The next stage is to configure Telnet:

line vty 0 4
login
password cisco

or

line vty 0 4
login local
exit

username steve privilege 15 password happy

you will also need an enable password:

enable password ecstacy

======================================================

SSH is more complicated:  (The following were copied from the absolutely excellent Geekstuff website: http://www.thegeekstuff.com/2013/08/enable-ssh-cisco/

After having set the management VLAN, you need to

  1. Set hostname and domain name
    # config t
    (config)# hostname myswitch
    (config)# ip domain-name thegeekstuff.com
  2. Generate SSH keys
    myswitch(config)# crypto key generate rsa
     The name for the keys will be: myswitch.thegeekstuff.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]
  3. Line vty set up:
    # line vty 0 4
    (config-line)# transport input ssh
    (config-line)# login local
    (config-line)# password 7
    (config-line)# exit
  4. Do the same for the console
    # line console 0
    (config-line)# logging synchronous
    (config-line)# login local
  5. Create username and password
    myswitch# config t
    Enter configuration commands, one per line.  End with CNTL/Z.
    myswitch(config)# username ramesh password mypassword
  6. Create enable password, if you haven’t already
    myswitch# enable secret myenablepassword
  7. Make all passwords not visible in sh run
    myswitch# service password-encryption

 

 

 

Leave a comment