How To Configure SSH Server On Router

In This Tutorial We Are Going To Learn How To Configure SSH Server On Router 

Here Firstly We Are Taking 2Routers 2Pc’s And 2Switches After Taking All These Things Connect Both The Routers To Each Others And Then Connect The Routers To Switch And Connect The Pc’s To The Switches

Here Is The Diagram You Can Check

Now Firstly Give The Ip’s To Both The Pc’s And Then Do The Configuration Of Assining The Ip And Routing And Configuration Of SSH Server On The Routers 

Here Is The Configuration Of Router 1

Router>en
Router#config t
Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#ip add 2.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#ip add 1.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit

Here IS The Configuration Of Router 2

Router>en
Router#config t
Router(config)#hostname R2
R2(config)#int f0/0
R2(config-if)#ip add 2.0.0.2 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int f0/1
R2(config-if)#ip add 3.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit

Here IS The Configuration Of Static Roution On Router 1

R1>en
R1#config t
R1(config)#ip route 3.0.0.0 255.0.0.0 2.0.0.2 

Here IS The Configuration Of Static Roution On Router 2

R2>en
R2#config t
R2(config)#ip route 1.0.0.0 255.0.0.0 2.0.0.1

Now we Do The Configuration Of SSH Server On Router

R1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip domain-name ccna.com
R1(config)#crypto key generate rsa

The name for the keys will be: R1.ccna.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)#ip ssh version 2
*Mar 1 0:25:38.969:  %SSH-5-ENABLED: SSH 1.99 has been enabled

R1(config)#ip ssh authentication-retries 3
R1(config)#ip ssh time-out 60
R1(config)#line vty 0 4
R1(config-line)#transport input ssh
R1(config-line)#privilege level 15
R1(config-line)#login local
R1(config-line)#username admin privilege 15 secret linux123
R1(config)#

Now Test The SSH Connection From Pc To Router

PC>ssh -l admin 1.0.0.1

Open

Password: linux123

Here IS All The Configuration Of SSH Server On Router

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s