Lecture 7 Telnet SSH
Lecture 7 Telnet SSH
Lecture 7 Telnet SSH
Lecture 7
Telnet and SSH
What is Telnet?
Telnet is a protocol that allows you to connect to remote computers (called hosts) over a TCP/IP network.
What is SSH?
SSH is a secure remote login protocol. The major difference between ssh and other remote login
programs is that ssh encrypts the password and other information so that it can't be "sniffed" by
To enable telnet, we start configuring VTY ports. VTY ports are specifically visual not physical
3. SSH encrypts the data while Telnet sends data in plain text
4. SSH uses a public key for authentication while Telnet does not use any authentication
6. Telnet has been all but replaced by SSH in almost all uses.
1
King Saud University
College of Applied Studies and Community Service
Natural and Engineering Program
Default
Device Interface IP Address Subnet Mask
Gateway
R1 Fa0/0 192.168.0.245 /24 N/A
PC1 NIC 192.168.0.15 /24 192.168.0.245
Configuring Telnet:
NOTE: Keep the CLI screen and the command terminal screen opened !
1. Draw the above network in packet tracer and configure it with the addresses.
2. Open the Router's CLI and write the following lines to enable the telnet protocol.
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#line vty 0 4
PC>telnet 192.168.0.245
Trying 192.168.0.245 …Open
[Connection to 192.168.0.245 ...closed by foreign host]
4. Go back to R1's CLI and write the following code to set Line connection password
( password for remote access Telnet):
R1 (config-line)#password cisco
PC>telnet 192.168.0.245
Trying 192.168.0.245 …Open
User Access Verification
Password:
R1>
R1> enable
% No password set.
R1>
2
King Saud University
College of Applied Studies and Community Service
Natural and Engineering Program
Go back to R1's CLI and write the following code to set R1's Global Configuration mode
password:
PC>telnet 192.168.0.245
Trying 192.168.0.245 …Open
User Access Verification
Password:
R1>
R1> enable
R1#
Now you will gain full access to R1's router and you can configure it completely
from PC1
To exit from the telnet access to R1 simply writes the following line:
R1#exit
R1>exit
PC1>
Configuring SSH
Default
Device Interface IP Address Subnet Mask
Gateway
R1 Fa0/0 10.0.0.1 /8 N/A
PC1 NIC 10.0.0.2 /8 10.0.0.1
1. Draw the above network in packet tracer and configure it with the addresses.
2. Open the Router's CLI and write the following lines to enable the SSH protocol.
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#ip domain-name example.com
R1(config)#crypto key generate rsa
How many bits in the modulus [512]: 800
R1(config)#username ct1306 password 855
R1(config)#ip ssh time-out 30
3
King Saud University
College of Applied Studies and Community Service
Natural and Engineering Program
3. Now open the PC's terminal and write the following lines to (We will try to remotely
access the router from the PC using the ssh protocol):
use the password that has been set to the ssh connection (855)
R1>enable
%No password set.
R1>
4. Go back to R1's CLI and write the following code to set R1's Global Configuration
mode password:
5. Return back to the PC's terminal and try accessing R1 again, use the password
that has been set for the Router's Global Configuration (ex4)
R1>enable
R1#
Now you will gain full access to R1's router and you can configure it completely
from PC1