cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2048
Views
0
Helpful
0
Replies

SSH authentication using public/private key

Denis Orlov
Level 1
Level 1

Hello, friends.

I'm trying to setup ssh using public/private key on Cisco router.

1) I launch puttygen. Press "Generate" button.

After key genereating, I get following

2) In the "key passphrase" and "Confirm passphrase" I entered "cisco".

3) After that, I click "save public key" button and save public key in the folder on the desktop of my windows PC.

3) Than I click "save private key" button and save private key in the sane folder.

4) After that I go to the CLI of my router and do following:


Router(config)#ip domain-name cisco.com

Router(config)#crypto key generate rsa modulus 1024

Router(config)#ip ssh version 2

Router(config)#ip ssh pubkey-chain

Router(conf-ssh-pubkey)#username denis

Router(conf-ssh-pubkey-user)#key-string

Router(conf-ssh-pubkey-data)#<here I copy and paste public key, that was generated by puttygen>

Router(conf-ssh-pubkey-data)#exit

Router(conf-ssh-pubkey-user)#exit

Router(config-ssh-pubkey)#exit

Router(config)#

5) Than I add my private key in Putty settings.

But when I trying to connect to router using putty, I'm getting following error

6) Why Cisco Router refuse my private key?

Because in the "show run" output of my router I can see, that finerprint is the same as in the puttygen output

 

Also, the output of "show ip ssh" show correct public key, that was generated by puttygen and that was pasted in the configurtion of the router.

Help. please. What I'm doing wrong.

Thanks.

 

 

 

 

 

 

 

0 Replies 0