How to Configure SSH in Cisco Packet Tracer?

How to Configure SSH in Cisco Packet Tracer?SSH (Secure Shell) provides secure management of network devices. The SSH protocol establishes a secure connection to a network device to which you have access and prevents your connection from being accessed by malicious users.
How to Configure SSH in Cisco Packet Tracer?

How to Configure SSH in Cisco Packet Tracer?

SSH is a very secure protocol according to the Telnet connection. The SSH protocol uses the TCP 22 port by default. The default port number may vary.

Before configuring the SSH connection on Cisco Router, let’s explain the SSH protocol versions. These versions are Version 1 and Version 2. SSH V2 provides a more secure connection than V1, and the most widely used version is Version 2. It is recommended that you enable SSH V2 as much as possible to remotely manage Cisco network devices or other network devices.

In the real scenario, to enable SSH on the Cisco Router, make sure that the file name of your Cisco IOS software includes the k9(crypto) phrase.

In our previous scripts, we discussed How to Configure Telnet in Cisco Packet Tracer and How to Connect Cisco Router Console in Packet Tracer. In this article, we will configure the SSH configuration on Cisco Routers using Cisco Packet Tracer.

How to Enable SSH on Cisco Router in Cisco Packet Tracer?

With the Cisco Packet Tracer, we can now pass the steps to enable SSH on Cisco Router. First, run the Packet Tracer program and then create a network topology like the one below.

   Step 1

The reason for adding the Cisco Router R1 that you see in the Packet Tracer workspace is to make SSH connections between the routers as well.

How to Configure SSH in Cisco Packet Tracer?

   Step 2

Open the CLI command prompt by clicking once on the Cisco Router, which is called SYSNETTECH, and type No to bypass the initial configuration and press Enter.

How to Configure SSH in Cisco Packet Tracer?

   Step 3

To configure SSH in Cisco Packet Tracer, apply the following commands, respectively.

Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname SYSNETTECH
SYSNETTECH(config)#interface gigabitethernet 0/0
SYSNETTECH(config-if)#ip address 192.168.1.1 255.255.255.0
SYSNETTECH(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
SYSNETTECH(config-if)#exit
SYSNETTECH(config)#ip domain name sysnettechsolutions.com
SYSNETTECH(config)#crypto key generate rsa
The name for the keys will be: SYSNETTECH.sysnettechsolutions.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]
SYSNETTECH(config)#ip ssh version 2
*Mar 1 0:6:12.698: %SSH-5-ENABLED: SSH 1.99 has been enabled
SYSNETTECH(config)#ip ssh time-out 10
SYSNETTECH(config)#ip ssh authentication-retries 3
SYSNETTECH(config)#line vty 0 4
SYSNETTECH(config-line)#login local
SYSNETTECH(config-line)#privilege level 15
SYSNETTECH(config-line)#transport input ssh
SYSNETTECH(config-line)#exit
SYSNETTECH(config)#username cisco privilege 15 password cisco123
SYSNETTECH(config)#end
SYSNETTECH#wr
Building configuration...
[OK]
SYSNETTECH#

 
How to Configure SSH in Cisco Packet Tracer?

   Step 4

After you have configured the SSH on Cisco Router, configure the PC1’s IP settings as follows.

How to Configure SSH in Cisco Packet Tracer?

   Step 5

To quickly configure the interface of Cisco Router R1, double-click it, click the Config tab in the window that opens and enable Port Status option. And then configure the IP address settings of the GigabitEthernet0/0 interface.

How to Configure SSH in Cisco Packet Tracer?

   Step 6

To test the SSH connection on Cisco Router, open the PC1 command prompt and run the following command to make the SSH connection.

ssh -l cisco 192.168.1.1

 

-l: It means to log in.
cisco: The username to be used to make the SSH connection to the router.
192.168.1.1: Cisco Router IP address.

 
How to Configure SSH in Cisco Packet Tracer?

   Step 7

Type the password for the username you created for the SSH connection and press Enter. An SSH connection will be established as shown below.

How to Configure SSH in Cisco Packet Tracer?

   Step 8

After applying the show ssh command on PC1 Command Prompt, you can see the running SSH version in the following image.

How to Configure SSH in Cisco Packet Tracer?

   Step 9

In this step, execute the following command for the SSH connection from the Cisco Router to the Cisco Router. This command is identical to the command we connected with PC1.

ssh -l cisco 192.168.1.1

 
How to Configure SSH in Cisco Packet Tracer?

   Step 10

In the Cisco Packet Tracer SSH configuration, type the password for the SSH connection to the Cisco Router and press the Enter key.

How to Configure SSH in Cisco Packet Tracer?

   Step 11

You made an SSH connection from the Cisco Router to the Cisco Router.

How to Configure SSH in Cisco Packet Tracer?

[su_box title=”Our Recommendation” box_color=”#242424″ radius=”0″]

You can purchase “How to Master CCNA” from Amazon.

[/su_box]

Show Commands Related to Configuring SSH in Cisco Packet Tracer

[su_tabs active=”1″]
[su_tab title=”SYSNETTECH#show running-config”]

SYSNETTECH#show running-config
Building configuration...

Current configuration : 799 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SYSNETTECH
!
!
!
no ip cef
no ipv6 cef
!
!
!
username cisco privilege 15 password 0 cisco123
!
!
license udi pid CISCO1941/K9 sn FTX152488GK
!
!
ip ssh version 2
ip ssh time-out 10
ip domain-name sysnettechsolutions.com
!
!
spanning-tree mode pvst
!
!
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login local
transport input ssh
privilege level 15
!
!
end
SYSNETTECH#

[/su_tab]

[su_tab title=”SYSNETTECH#show ssh”]

SYSNETTECH#show ssh
Connection Version Mode Encryption Hmac State Username
133 1.99 IN aes128-cbc hmac-sha1 Session Started cisco
133 1.99 OUT aes128-cbc hmac-sha1 Session Started cisco
133 1.99 IN aes128-cbc hmac-sha1 Session Started cisco
133 1.99 OUT aes128-cbc hmac-sha1 Session Started cisco
%No SSHv1 server connections running.
SYSNETTECH#

[/su_tab]

[su_tab title=”SYSNETTECH#show ip ssh”]

SYSNETTECH#show ip ssh
SSH Enabled - version 2.0
Authentication timeout: 10 secs; Authentication retries: 3
SYSNETTECH#

[/su_tab]
[/su_tabs]

How to Configure SSH in Cisco Packet Tracer ⇒ Video

To configure SSH in Cisco Packet Tracer, you can watch the following video and also subscribe to our YouTube channel to support us.

  Final Word

In this article, we have discussed how to make an SSH connection from the PC to the Router and from the Router to the Router to verify the SSH connection after we have configured the SSH on the Cisco Router. In the real scenario, make sure that you have the k9(crypto) feature of your Cisco IOS software to configure SSH on Cisco Routers. Thanks for following us!

If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!

Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!

Articles Related to Configuring SSH in Cisco Packet Tracer

[su_box title=”Related Articles” box_color=”#242424″ radius=”0″]
♦ How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?
♦ How to Configure Inter-VLAN Routing in Cisco Packet Tracer?
♦ How to Configure Static NAT in Cisco Packet Tracer?
♦ How to Configure Dynamic NAT in Cisco Packet Tracer?
♦ How to Configure NAT PAT in Cisco Packet Tracer?
[/su_box]

Products Related to Configuring SSH in Cisco Packet Tracer

[su_box title=”Related Products” box_color=”#242424″ radius=”0″]

[/su_box]

Add a Comment

Your email address will not be published. Required fields are marked *