General
cancel
Showing results for 
Search instead for 
Did you mean: 

SSH Public key authentication

kholikt
Super Advisor

SSH Public key authentication

I have tried to setup the SSH authentication but it still won't work. Everytime I login using SSH I still prompt for password.

debug1: Found key in /root/home/root/.ssh/known_hosts:41
debug1: bits set: 1053/2048
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is publickey
debug1: userauth_pubkey_agent: testing agent key /root/home/root/.ssh/id_dsa
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: try privkey: /root/home/root/.ssh/id_rsa
debug1: try pubkey: /root/home/root/.ssh/id_dsa
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is keyboard-interactive
abc
6 REPLIES
Thummalu
Frequent Advisor

Re: SSH Public key authentication

Hi,

Say u r trying to ssh from server1 to server2.

The hostkey key pair of the server1 should be copied to the server2.

Check /etc/ssh2 directory for ssh_config and sshd2_config files and check that server1 is present in knownhosts directory.

Also the user based authenticationkeys needs to be copied... in /home/root/roor/.ssh2 directory. Check for that also.

br
Thummalu


Ivan Ferreira
Honored Contributor

Re: SSH Public key authentication

You must copy your id_dsa.put to remote .ssh/authorized_keys file.

The permissions for the .ssh directory should be 700 and for the authorized_keys file 600. StrictMode checks the files permissions.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Senthil Prabu.S_1
Trusted Contributor

Re: SSH Public key authentication

Hi,
I don't know, where is the problem. So better try again from scratch.

Also find the necessary docs for it.
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Senthil Prabu.S_1
Trusted Contributor

Re: SSH Public key authentication

Sorry, I missed the attachement last time.


This time with attachment
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Vipulinux
Respected Contributor

Re: SSH Public key authentication

Geoff Wild
Honored Contributor

Re: SSH Public key authentication

Have a look at this how to of sorts:

http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/

I have used it - and it works.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.