pub key authentication
I've tried everything but cannot get openssh to work with public key authentication. My server is CentOS 4.2, im using ssh-2 and openssh version is 5.1. Below is the output from ssh -v (i've changed the names to protect the innocent)
Code:
debug1: Authentications that can continue: publickey,password,keyboard-interactive Code:
Port 5348 I've also set the permissions of the .ssh directory and authorized_keys file as prescribed thruout the web. But, I'm not sure who should be owner of these and the path. Currently the path is /root/.ssh/authorized_keys and the owner:group is john:john. I've also tried setting the path to same location as the openssh server but to no avail. Any help? P.S I am linux newbie |
additional comments
I'm using dsa and I've tried ssh-keygen as well as the Passwords and Encryption keys tool in ubuntu 8.04. Also, when it comes time for the dsa passphrase, I am never asked.
|
I guess there's nothing wrong with your sshd_config, but you might want to try the tutorial below to correctly create and transfer your key to the server;
Configure passwordless ssh login |
Read through this post. You will note that the problem ended up being a permissions issue of various key files as described therein.
http://www.linuxquestions.org/questi...prompt-664733/ |
I've changed my permissions but it still doesnt work. I get
rexec line 84: Unsupported option UsePAM In my /var/log/messages on the server after I try to ssh in. On the client side, this is what is see debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /home/dale/.ssh/id_rsa debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,password debug2: we did not send a packet, disable method debug1: Next authentication method: password |
Which machine gives you the rexec error? What is the client machine telling you?
Can you show ls -lad ~/.ssh and ls -la ~/.ssh for both the client and server machines |
from server
total 32 drwxr-xr-x 2 root root 4096 Sep 6 08:38 . drwxr-x--- 20 root root 4096 Sep 7 06:47 .. -rw-r--r-- 1 root root 398 Sep 6 08:37 authorized_keys -rw-r--r-- 1 root root 606 Aug 29 10:27 authorized_keys2 from client drwx------ 2 dale dale 4096 2008-09-06 14:37 . drwxr-xr-x 60 dale dale 4096 2008-09-07 06:29 .. -rw------- 1 dale dale 1743 2008-09-06 08:32 id_rsa -rw-r--r-- 1 dale dale 630 2008-09-06 14:37 id_rsa.keystore -rw-r--r-- 1 dale dale 398 2008-09-06 08:32 id_rsa.pub -rw-r--r-- 1 dale dale 540 2008-09-06 08:50 known_hosts NOTE that now, I've tried rsa keys to work but still nothing. Also I'm not using the authorized_keys2. I'm beginning to wonder if its not a client side issue. I have a linksys router with DD-WRT installed and I can log on there through ssh either if I use keys. I tried generating a key serverside but that doesnt work either. |
All times are GMT -5. The time now is 04:41 PM. |