Home ยป Cisco switch/router SSH configuration

Cisco switch/router SSH configuration

Configuring a Cisco switch for SSH connection is an important task for network administrators. This process requires a good understanding of the Windows OS and network protocols such as TCP/IP, traceroute, etc. In this article, we will discuss the steps to configure a Cisco switch for SSH connection and how to troubleshoot any issues that may arise during the configuration process. We will also discuss the differences between configuring a switch and router and what makes them different in terms of security.

In our example, we have one layer-3 switch and 1 laptop with console connection. So we are going to configure our Cisco Switch on console to enable ssh connections.

Switch>enable
Switch#configure terminal

	
Switch(config)#username baris password 1234
Switch(config)#enable secret level 15 baris
Switch(config)#int vlan 1
Switch(config-if)#ip address 192.168.1.10 255.255.255.0
Switch(config-if)#no shutdown

Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

Switch(config-if)#exit
Switch(config)#line vty 0 4
Switch(config-line)#transport input ssh
Switch(config-line)#login local

Switch(config)#ip domain-name ITOPS

Switch(config)#hostname SW1
SW1(config)#crypto key generate rsa
The name for the keys will be: SW1.ITOPS
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]

SW1(config)#ip ssh version 2
*Mar 1 0:3:35.82: %SSH-5-ENABLED: SSH 2 has been enabled
SW1(config)#do wr
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]

SW1(config)#ip default-gateway 192.168.1.1
SW1(config)#do wr
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
SW1(config)#
%LINK-5-CHANGED: Interface GigabitEthernet1/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

SW1#
%SYS-5-CONFIG_I: Configured from console by console

SW1#

Related Posts

error: Content is protected !!