how to configure ssh in cisco packet tracer(telnet+ssh)
In this tutorial, you gonna learn how to configure telnet and ssh remotely.
- Drag and drop PC, router, and switch.
- Connect them using cable.
Now follow the steps shown in the video posted below (:
CLI COMMAND:
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco CISCO1941/K9 (revision 1.0) with 491520K/32768K bytes of memory.
Processor board ID FTX152400KS
2 Gigabit Ethernet interfaces
DRAM configuration is 64 bits wide with parity disabled.
255K bytes of non-volatile configuration memory.
249856K bytes of ATA System CompactFlash 0 (Read/Write)
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>
Router>
Router>
Router>enable
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#line vty ?
<0-15> First Line number
Router(config)#line vty 0 15
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#login local
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#user pawan password cisco
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#enable password cisco
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#ip domain-name pawan.com
Router(config)#
Router(config)#crypto key generate rsa
% Please define a hostname other than Router.
Router(config)#
Router(config)#
Router(config)#hostname R1
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#crypto key generate rsa
The name for the keys will be: R1.pawan.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]
R1(config)#
*Mar 1 0:7:18.596: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#
R1(config)#
R1(config)#
R1(config)#line vty 0 15
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#transport input ssh
R1(config-line)#
R1(config-line)#
R1(config-line)#login local
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#ip ssh ver 2
R1(config)#
R1(config)#
R1(config)#username pawan privilege 15 password cisco
R1(config)#
R1(config)#
R1(config)#
R1(config)#do wr
Building configuration...
[OK]
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
%SYS-5-CONFIG_I: Configured from console by console
R1 con0 is now available
Press RETURN to get started.
R1>
R1>
R1>
R1>
COMMAND PROMPT:
Packet Tracer PC Command Line 1.0
C:\>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 192.168.10.1: bytes=32 time=16ms TTL=255
Reply from 192.168.10.1: bytes=32 time=2ms TTL=255
Ping statistics for 192.168.10.1:
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 16ms, Average = 9ms
C:\>telnet 192.168.10.1
Trying 192.168.10.1 ...Open
[Connection to 192.168.10.1 closed by foreign host]
C:\>
C:\>
C:\>
C:\>
C:\>telnet 192.168.10.1
Trying 192.168.10.1 ...Open
User Access Verification
Username: cisco
Password:
% Login invalid
Username:
Username: pawan
Password:
Router>
Router>
Router>
Router>
Router>
Router>enable
Password:
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#exit
R1#exit
[Connection to 192.168.10.1 closed by foreign host]
C:\>ssh -l pawan 192.168.10.1
Password:
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#show ssh
Connection Version Mode Encryption Hmac State Username
133 1.99 IN aes128-cbc hmac-sha1 Session Started pawan
133 1.99 OUT aes128-cbc hmac-sha1 Session Started pawan
%No SSHv1 server connections running.
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#show interface
GigabitEthernet0/0 is up, line protocol is up (connected)
Hardware is CN Gigabit Ethernet, address is 00e0.8f20.1301 (bia 00e0.8f20.1301)
Internet address is 192.168.10.1/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 90 bits/sec, 1 packets/sec
5 minute output rate 68 bits/sec, 0 packets/sec
792 packets input, 32267 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 1017 multicast, 0 pause input
0 input packets with dribble condition detected
422 packets output, 17466 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
GigabitEthernet0/1 is administratively down, line protocol is down (disabled)
Hardware is CN Gigabit Ethernet, address is 00e0.8f20.1302 (bia 00e0.8f20.1302)
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 1017 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Vlan1 is administratively down, line protocol is down
Hardware is CPU Interface, address is 0030.a3dd.3da6 (bia 0030.a3dd.3da6)
MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 21:40:21, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1682 packets input, 530955 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
563859 packets output, 0 bytes, 0 underruns
0 output errors, 23 interface resets
0 output buffer failures, 0 output buffers swapped out
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco CISCO1941/K9 (revision 1.0) with 491520K/32768K bytes of memory.
Processor board ID FTX152400KS
2 Gigabit Ethernet interfaces
DRAM configuration is 64 bits wide with parity disabled.
255K bytes of non-volatile configuration memory.
249856K bytes of ATA System CompactFlash 0 (Read/Write)
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>
Router>
Router>
Router>enable
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#line vty ?
<0-15> First Line number
Router(config)#line vty 0 15
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#login local
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#
Router(config-line)#user pawan password cisco
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#enable password cisco
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#ip domain-name pawan.com
Router(config)#
Router(config)#crypto key generate rsa
% Please define a hostname other than Router.
Router(config)#
Router(config)#
Router(config)#hostname R1
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#crypto key generate rsa
The name for the keys will be: R1.pawan.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]
R1(config)#
*Mar 1 0:7:18.596: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#
R1(config)#
R1(config)#
R1(config)#line vty 0 15
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#transport input ssh
R1(config-line)#
R1(config-line)#
R1(config-line)#login local
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#
R1(config-line)#ip ssh ver 2
R1(config)#
R1(config)#
R1(config)#username pawan privilege 15 password cisco
R1(config)#
R1(config)#
R1(config)#
R1(config)#do wr
Building configuration...
[OK]
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
%SYS-5-CONFIG_I: Configured from console by console
R1 con0 is now available
Press RETURN to get started.
R1>
R1>
R1>
R1>
COMMAND PROMPT:
Packet Tracer PC Command Line 1.0
C:\>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 192.168.10.1: bytes=32 time=16ms TTL=255
Reply from 192.168.10.1: bytes=32 time=2ms TTL=255
Ping statistics for 192.168.10.1:
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 16ms, Average = 9ms
C:\>telnet 192.168.10.1
Trying 192.168.10.1 ...Open
[Connection to 192.168.10.1 closed by foreign host]
C:\>
C:\>
C:\>
C:\>
C:\>telnet 192.168.10.1
Trying 192.168.10.1 ...Open
User Access Verification
Username: cisco
Password:
% Login invalid
Username:
Username: pawan
Password:
Router>
Router>
Router>
Router>
Router>
Router>enable
Password:
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1(config)#exit
R1#exit
[Connection to 192.168.10.1 closed by foreign host]
C:\>ssh -l pawan 192.168.10.1
Password:
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#show ssh
Connection Version Mode Encryption Hmac State Username
133 1.99 IN aes128-cbc hmac-sha1 Session Started pawan
133 1.99 OUT aes128-cbc hmac-sha1 Session Started pawan
%No SSHv1 server connections running.
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#show interface
GigabitEthernet0/0 is up, line protocol is up (connected)
Hardware is CN Gigabit Ethernet, address is 00e0.8f20.1301 (bia 00e0.8f20.1301)
Internet address is 192.168.10.1/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 90 bits/sec, 1 packets/sec
5 minute output rate 68 bits/sec, 0 packets/sec
792 packets input, 32267 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 1017 multicast, 0 pause input
0 input packets with dribble condition detected
422 packets output, 17466 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
GigabitEthernet0/1 is administratively down, line protocol is down (disabled)
Hardware is CN Gigabit Ethernet, address is 00e0.8f20.1302 (bia 00e0.8f20.1302)
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 1017 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Vlan1 is administratively down, line protocol is down
Hardware is CPU Interface, address is 0030.a3dd.3da6 (bia 0030.a3dd.3da6)
MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 21:40:21, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1682 packets input, 530955 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
563859 packets output, 0 bytes, 0 underruns
0 output errors, 23 interface resets
0 output buffer failures, 0 output buffers swapped out
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
R1#
In this tutorial, we have learned how to configure telnet and ssh on a Cisco Router or switch. we would love to hear from you and your valuable suggestions to improve the article. Please also share the tutorial with others, it will not cost you anything.
0 Response to "how to configure ssh in cisco packet tracer(telnet+ssh)"
Post a Comment