PDA

View Full Version : How to connect with SSH ?


sukarabi
09-23-2008, 08:58 AM
Hello,

Does someone know how to connect via SSH from a Cisco router to another one ?
I did the SSH setup on Router2 and I would like to test it from Router1 but everything I tryied didn't work.
The problem, I think, after using ? on the command line, should be from an expected login that I don't have. I don't know what to use as a login on my Router2 because I never use any.
What I did is just to setup a password on the vty lines, set up SSH and try to connect like this:
ssh -l 160.10.1.2

any idea would help me, thanks.

custangro
09-23-2008, 11:30 AM
Hello,

Does someone know how to connect via SSH from a Cisco router to another one ?
I did the SSH setup on Router2 and I would like to test it from Router1 but everything I tryied didn't work.
The problem, I think, after using ? on the command line, should be from an expected login that I don't have. I don't know what to use as a login on my Router2 because I never use any.
What I did is just to setup a password on the vty lines, set up SSH and try to connect like this:
ssh -l 160.10.1.2

any idea would help me, thanks.

You have to set up a username with the username command.

Example:

router# conf t
router(config)# username sukarabi password cisco


Also follow the configurations on page 198 in Mr. Lammle's book.

-C

pconlan
09-23-2008, 11:38 AM
SSH requires that you use a username and password for authentication. This means that you have to use the local database. To configure this on your your where you have SSH setup you have to do these commands.

r2(config)#line vty 0 4
r2(config-line)#login local
r2(config-line)#transport input ssh
r2(config-line)#exit
r2(config)#username Bob password abcd1234 (puts a user in database)

now on Router 1 you can use the
ssh -l bob 160.10.1.2

after you do this it will prompt you for the password that you set, in my example it was abcd1234. You can use your own name and password.

Hope that helps
Pat

sukarabi
09-23-2008, 11:11 PM
Thanks Custangro and pconlan for your help.
It's obvious now.