Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

16.4.

7 - Configure Network Devices with SSH

What is SSH?
The Secure Shell Protocol is a cryptographic network protocol for operating network services
securely over an unsecured network. Its most notable applications are remote login and
command-line execution.

Objectives
Part 1: Configure Basic Device Settings
Part 2: Configure the Router for SSH Access
Part 3: Configure the Switch for SSH Access
Part 4: SSH from the CLI on the Switch

Part 1: Configure Basic Device Settings


● Connect Cables
● Configure Router
○ Use Console Cable from PC to the router
○ Open PC-A > Desktop > Terminal
○ Do Command Set 1 to configure router
● Configure PC-A
○ Go to main desktop tab
○ Set IP Address, Subnet Mask, and Default Gateway according to Addressing
Table
● Verify Connectivity (ping)
○ Open Command Prompt in PC-A
○ Use command “ping 192.162.1.1”
Part 2: Configure the Router for SSH Access
● Change device name
○ On PC-A, go to terminal and do Command Set 2.1
● Configure encryption key method (on conf term)
○ Enter the following commands
■ crypto key generate rsa
■ 1024
● Configure Database Username
○ Enter the following Command
■ username admin secret Adm1nP@55
● Enable SSH on the VTY Lines (on conf term)
○ Do Command Set 2.2
● Save running config to startup config
○ Enter the following command
■ copy running-config startup-config
● Establish SSH connection to the router
○ //Start Tera Term from PC-A (on real set up)
○ Open Telnet/SSH Client
○ Input IP Address and username
○ Input password
○ exit

Part 3: Configure the Switch for SSH Access


● Change Console Cable from Router to Switch
● Configure basic setting on switch
○ Go to PC-A Terminal
○ Do Command Set 3.1
● Configure switch for SSH Connectivity
○ Do Command Set 3.2
● Open Command Prompt and enter the following commands
○ ssh -l 192.168.1.11
○ Adm1nP@55
○ enable
○ class
● If you see “S1#”, you access S1 with SSH
● Type exit

Part 4: SSH from the CLI on the Switch


● Go to terminal to access switch, it should be S1#
● To access the router using ssh, use the following command
○ ssh -l 192.168.1.1
○ Adm1nP@55
○ enable
○ class
● To go back to S1 without closing the SSH session press Ctrl+Shift+6, and press x when
released.
● To go back to R1 again, press enter
● To end SSH session on R1, type exit on prompt
Command Set 1:Configure Basic Device Setting - Router
enable
configure terminal
no ip domain lookup (disable DNS)
enable secret class
line console 0
password cisco (Console Password)
login
line vty 0 15
password cisco (VTY password)
login
exit
service password-encryption
banner motd #Unauthorize Access is Prohibited# (Banner Message)
int g0/0/1 (access interface g0/0/1)
ip address 192.168.1.1 255.255.255.0 (set IP address)
no shutdown (enable interface)
copy running-config startup-config (Save running config to startup config)

Command Set 2.1: Configure the Router for SSH Access


enable
configure terminal
hostname R1 (Set router name)
ip domain-name cisco-lab.com (set domain name)

2.2
line vty 0 15
//transport input telnet ssh (enable telnet and ssh) <= ONLY WORK FOR ACTUAL ROUTER
transport input ssh
login local (will use local database, which is username admin secret Adm1nP@55 )

Command Set 3.1: Configure the Switch for SSH Access


enable
configure terminal
no ip domain lookup (disable DNS)
enable secret class
line console 0
password cisco (Console Password)
login
line vty 0 15
password cisco (VTY password)
login
exit
service password-encryption
banner motd #Unauthorize Access is Prohibited# (Banner Message)
int vlan 1 (access vlan 1)
ip address 192.168.1.11 255.255.255.0 (set IP Address and subnet)
no shutdown (enable interface)
exit
ip default-gateway 192.168.1.1 (set default gateway)
copy running-config startup-config (Save running config to startup config)
3.2
configure terminal
hostname S1
domain cisco-lab.com
crypto key generate rsa
1024
username admin secret Adm1nP@55
line vty 0 15
//transport input telnet ssh (enable telnet and ssh) <= ONLY WORK FOR ACTUAL SWITCH
transport input ssh
login local (will use local database, which is username admin secret Adm1nP@55 )
end
copy running-config startup-config

You might also like