Monday, February 23, 2009

Enable and configure ssh on Cisco router

Enabling SSH on Cisco IOS

As a pre-requisite you need to set a domain name for your router.
R1(config)#ip domain-name safeer.in

Now you need to generate a host rsa key for your router.

R1(config)#crypto key generate rsa
The name for the keys will be: R1.safeer.in
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]:
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]

Now configure a few ssh options.

R1(config)#ip ssh authentication-retries 3
R1(config)#ip ssh time-out 60

Configure your terminal lines to access ssh as a transport mechanism.

R1(config)#line vty 0 4

R1(config-line)#transport input ssh telnet
R1(config-line)#end

Now save your configuration

R1#copy run start

Destination filename [startup-config]?
Building configuration...
[OK]
R1#


No comments:

Post a Comment