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
- Connect DB9 to Cons port on router
- Connect Serial cable to PC, or via adapter if no serial cable
- 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
- Set hostname and domain name
# config t (config)# hostname myswitch (config)# ip domain-name thegeekstuff.com
- 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]
- Line vty set up:
# line vty 0 4 (config-line)# transport input ssh (config-line)# login local (config-line)# password 7 (config-line)# exit
- Do the same for the console
# line console 0 (config-line)# logging synchronous (config-line)# login local
- Create username and password
myswitch# config t Enter configuration commands, one per line. End with CNTL/Z. myswitch(config)# username ramesh password mypassword
- Create enable password, if you haven’t already
myswitch# enable secret myenablepassword
- Make all passwords not visible in sh run
myswitch# service password-encryption