Thursday, September 29, 2016

SSH Configuration in CISCO Router

Use SSH in CISCO Router for remote login and avoid Telnet.

Configure SSH in R1:

R1#conf t
R1(config)#hostname dhaka
dhaka(config)#ip domain-name walton
dhaka(config)#username atik password secret Only4@tik
dhaka(config)#crypto key generate rsa modulus 2016
The name for the keys will be: dhaka.walton
% The key modulus size is 2016 bits
% Generating 2016 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 7 seconds)
dhaka(config)#
*Sep 29 21:35:26.255: %SSH-5-ENABLED: SSH 1.99 has been enabled

dhaka(config)#line vty 0 15
dhaka(config-line)#login local
dhaka(config-line)#transport input ssh
dhaka(config-line)#exit
dhaka(config)#do wr
dhaka(config)#enable sec
dhaka(config)#enable secret console
dhaka(config)#

Enable Routing Between R1 and R2 for Communication:
dhaka(config)#interface gigabitEthernet 1/0
dhaka(config-if)#no shutdown
dhaka(config-if)#ip address 172.16.12.1 255.255.255.0
dhaka(config-if)#exit
dhaka(config)#router rip
dhaka(config-router)#version 2
dhaka(config-router)#network 172.16.12.0
dhaka(config-router)#exit

Remote Login From R2:
R2(config)#interface gigabitEthernet 1/0
R2(config-if)#ip address 172.16.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 172.16.12.0
R2(config-router)#exit
R2(config)#do wr
R2(config)#hostname chittagong

Check Configuration:

chittagong#ssh -l atik 172.16.12.1
Password:
dhaka>enable
Password:
dhaka#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
dhaka(config)#sh
dhaka(config)#do sh run
Building configuration...

Current configuration : 1441 bytes
!
! Last configuration change at 21:37:06 UTC Thu Sep 29 2016
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname dhaka
!
boot-start-marker
boot-end-marker
!
!
enable secret 4 YxW5H6m4wDm7DPsJlqLzcDnHEjSMqzNds6yAjUZR6kk
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
 --More--
*Sep 29 22:03:38.283: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

No comments:

Post a Comment

Configure rb metal 2shpn As Access Point

Turn On rb Metal 2shpn Router as like : Connect rb metal 2shpn with your Laptop by winbox. Open Winbox: Click on Neighbors you w...