Configure Telnet and SSH on Cisco Packet Tracer
To enable telnet or SSH on Cisco router, simply do it with “line vty” command. lets Configure:
First create topology Network. and set a static IP for PC client, router and switch. See the picture below.
Go to Router0 console and configure Hostname, Secret password and telnet with “line vty” command.
- “Enable secret ‘your password’” command for your router password user privileges.
- The “line vty” command enable the telnet and the “0″ is just let a single line or session to the router. If you need more session simultaneously, you must type “line vty 0 10“, its mean 11 client can access telnet.
- The “logging synchronous” command stops any message output from splitting your typing.
The “exec-timeout” command just sets the time-out limit on the line from the default to “10″ minutes.
Testing Telnet Connectivity.
Let’s test telnet from the admin or client PC. Type telnet 192.168.1.1 and press enter, then enter the telnet username & password. Next type enable command and press enter, then type the router password.
Now you are remotely connected to router R1 and you can execute all router commands through telnet command line interface.
“line vte 1 3” <
service password-encryption <
encrypt your SSH password.
Testing SSH Connectivity
From a client PC, open the command line and type “ssh -l budi 192.168.1.1” then press enter.
Now we have connected successfully and the connection is secured with Secure Shell.
How to Configure SSH in Cisco Packet Tracer
Last Updated: January 15, 2020 , Tolga Bagci
SSH (Secure Shell) provides secure management of network devices. By using SSH, you establish a secure connection to a network device that you access, and your data is sent in encrypted form.
How to Enable SSH in Cisco Router with Packet Tracer
SSH is a much safer protocol than the Telnet protocol and uses the TCP 22 port by default. The port number may vary.
There are 2 versions of the SSH protocol. These; Version 1 and Version 2.
SSH V1 exploits several patented encryption algorithms and is vulnerable to a well-known vulnerability that could allow an attacker to enter data into the communication flow.
SSH V2, this release has an advanced key exchange algorithm that is not vulnerable to the same abuse and includes more powerful and comprehensive features:
• Encryption such as 3DES and AES.
• Use voice encryption Message Verification Code (MAC) algorithms for integrity checking.
• Support for public-key certificates.
We recommend that you use SSH V2 as far as possible to remotely manage network devices.
To enable SSH in the real scenario, make sure that the file name of your Cisco IOS software is k9 (crypto).
First, run Packet Tracer and then create a network topology as shown in the image below. Add an additional Router to the workspace, because after configuration we will connect the Router to the Router with SSH.
Open the CLI prompt by clicking on the SYSNETTECH Router and press Enter to skip the initial configuration.
To enable SSH on the router, perform the following commands in order.
Configure the IP settings of PC1 as follows.
To quickly configure the R1’s interface, double-click on it, click the Config tab in the window that opens, and then configure the Port Status option of the GigabitEthernet0/0 interface to On, then assign the IP address.
To test whether SSH is running, open the PC1 prompt and establish a connection using the command below.
Enter the user name and password you created, and as soon as you press Enter, the connection will be established as in the image below.
After executing the show ssh command on PC1 Command Prompt, you can check the version of the SSH protocol that is linked.
In this step, execute the following command to make SSH from router to router.
In the same way, enter the user account information you created on the Cisco Router and press Enter.
As you can see in the image below, a successful SSH connection is made.
With the simulator, you can watch the video below to enable SSH on the router and connect from the PC and also subscribe to our YouTube channel to support us!
In this article, after examining how to enable SSH, we have connected with SSH from PC to Router and Router to Router to verify the connection. In the real scenario, to configure SSH on Routers, make sure the IOS image has k9 (crypto). Thanks for following us!
Hello, I’m Tolga! I am a computer specialist who has been specializing in computer technologies for about 20 years. I provide solutions to problems encountered in many areas such as hardware, system, network, virtualization, server systems, and operating systems, and create relevant content on my website by explaining how to solve these problems. My goal is to be a reliable source of expert, quality, and trustworthy solutions for your computer problems. By following innovations and using the latest technologies, I aim to be successful in my job and provide you with the best service. Don’t hesitate to contact me for any questions or curiosity about technology. Have a nice day, stay up to date 🙂
SSH Configuration on Packet Tracer
SSH (Secure Shell) is one of the most used protocols in network World. As a secured alternative of Telnet, SSH is always in the life of a network engineer. It helps us to connect our routers, swithces and any other network equipments. Especially because of SSH is more secure, it is always prefered more than Telnet. In this lesson, we will focus on SSH Configuration on Cisco routers with an SSH Config Example. We will learn configuring SSH.
So, what will be our SSH Config steps? In this example, we will go through the below six steps one by one:
- IP Configurations
- Password Encryption
- Router Name Change
- Domain Data and Data Encryption
- Router User Config
- SSH Config
- SSH Verification
So, let’s start SSH Configuration and see how is the backplane config of our SSH connection on routers.
Before configuring SSH, firstly, we will configure IP addresses of router interface and the PC. We will use the below IP addresses:
Router fa0/0 Interface
Router # configure terminal
Router (config) # interface fa0/0
Router (config-if) # ip address 10.0.0.1 255.255.255.0
Router (config-if) # no shutdown
Router Name Change
We need to change the default router name to generate rsa key. Here, the default name is Router, let’s change this name to ABC.
Router (config) # hostname ABC
Domain Name and Data Encryption
In this step, we will set the domain name. Our domain name will be SSHabc. And after that, we will encrypt the data in it with “crypto key generate rsa” command.
During this configuration we will set the module sizes. So we will use 512 here.
ABC (config) # ip domain-name SSHabc
ABC (config)# crypto key generate rsa general-keys modules 512
Router User Config
This step is the classical user definion on the router. We will do it with username, password and the priviledge level. Our user is gokhan, password is abc123 and the priviledge mode is 15.
ABC (config) # username gokhan privilege 15 password abc123
We will use this username and password for SSH connection.
The main configuration step of this Configuring SSH lesson is this step. Here, we will do the SSH configuration in line mode.
Firstly, we will go to line mode and configure SSH for 16 users from 0 to 15. And then we will use “transport input ssh”. This command will allow only SSH access. Telnet accesses will be rejected.
Then, we will set the login as local with “login local” command. With this command, we can use local router users to ssh access.
After that , we will configure the the version of SSH. There are two SSH versions, SSH version 1 and SSH version 2. The second one provide more enhanced security agorithm. Here, we will use SSH version 2. To configure it, we will use “ip ssh version 2” command.
Lastly, we will save our SSH Configuration.
ABC (config) # line vty 0 15
ABC (config-line) # transport input ssh
ABC (config-line) # login local
ABC (config-line) # ip ssh version 2
ABC (config-line) # end
ABC # write
At the last step of Configuring SSH, SSH Config Example, we can try to connect via SSH from PC to the router. To do this, we will open the command line on the PC and connect to the router with the below command. Here our Router interface ip is 10.0.0.1.
Configuration of SSH on Cisco Switch in Packet Tracer
Configuration of SSH on Cisco Switch in Packet Tracer
This Article is about the configuration of SSH on Cisco Switch. You can configure SSH on Cisco devices very easily using these simple steps:
Check out the some best Switches with fast network speed .
- Crate a Packet Tracer Topology Lab
- Basic IP Setting for connectivity
- Set hostname and domain-name on Switch
- Set console and enable password for SSH login
- Generate the RSA Keys
- Setup the Line VTY configurations
- Create the username password for SSH access from PC
- Verify SSH access
For the configurations of SSH in packet tracer on Cisco switch, you are required to follow the above steps. Let start and perform these steps one by one. (Learn what is PSSH)
Crate a Packet Tracer Topology Lab
Our first step is to open the packet tracer and need to create a simple lab. For this topology we will use only one switch and a PC. Simply drag these two items on dashboard. Now we will connect them with straight through connection.
Basic IP Setting for connectivity
The next step is assign the suitable IP setting to these devices. For keeping it simple and making basic connectivity we will assign just two IP address to these device. We will assign the IP address to PC. For this will open the PC setting and then IP configuration. Here we will assign an IP address to host, in our case we are going to assign it 192.168.1.1 with the default gateway. For default gateway we will assign the IP address 192.168.1.10. We assign the second IP address to our Vlan1 interface on switch. And its IP address will be the gateway of host that is 192.168.1.10. For this we will use the basic commands.
Switch# config t
Switch(config)#interface vlan 1
Switch (config-if)# ip address 192.168.1.10 255.255.255.0
Switch (config -if)#no shut
Once you done with basic IP setting, you can verify the connectivity by pinging the interface vlan1 IP from host.
Set host-name and domain-name on Switch
For SSh configurations you need to configure a host-name and domain-name for your switch you can do this with these simple commands.
Switch # config t
Switch (config)#hostname SW1
SW1 ( config)#ip domain-name w7cloud.com
Set console and enable password for SSH login
For SSH access it is required that you must configure the console and enable password on your cisco switch. You can set these two passwords with following commands.
SW1 ( config)#line console 0
SW1(config -line)#logging synchronous
SW1(config- line)#login local
SW1 (config- line)#exit
SW1 # enable secret cisco
Generate the RSA Keys
Your Cisco switch must have RSA keys that for the SSH process. You can generate the RSA keys with following command:
SW1 ( config)# crypto key generate rsa
How many bits in the modulus : 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]
Set the size of key to 1024 bits.
If your Cisco Switch is running an older version of Cisco IOS image, then it is extremely recommended that you upgrade to latest Cisco IOS.
Setup the Line VTY configurations
For the configuration of SSH on cisco switch you need the following line vty configurations, and input transport is required to set to SSH. Set the login-to-local, & password to 7.
sw1 ( config)#line vty 0 4
sw1 ( config-line)#transport input ssh
sw1( config -line)#login local
sw1(config- line)#password 7
sw1(config- line ) #exit
Create the username password for SSH access from PC
If you do not have a username for SSH access you need to create a username. You can do it with this simple command:
Sw1# config t
sw1 (config ) # username w7cloud password cisco
Make sure the password encryption services is enabled on your switch, this service will encrypt your password, & when you do “sh run”, you’ll see only the encrypted password, not clear text password.
SW1# service password-encryption
Verify SSH access from Host
Once you done with the above configurations you can test all these configuration by creating a SSH connection from Host. You do it the command ssh –l <username> <IP address>. Open the host command prompt and use the command
C:\>ssh -l waqas 192.168.1.10
It will ask for password, provide the password that you created with this username in previous steps. Then it asked for console password and then you need to provide the enable password. Now you are in your Cisco switch. You can perform switch configurations from your host.
From the switch, if you use the command ‘sh ip ssh’, it will also confirm that SSH is enabled on this cisco swith.
For better understanding please watch the video and like it.
I hope this will be a helpful for you, please share your comments. If you like this then share this on social media. Thank you for reading this.