ssh without password does not work for some users

Posted by joshxdr on Server Fault See other posts from Server Fault or by joshxdr
Published on 2011-01-27T22:59:33Z Indexed on 2011/01/29 23:27 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

I have a new RHEL4 Linux box that I am using to copy data to old Solaris 2.6 and RHEL3 Linux boxes with scp. I have found that with the same setup, it works for some users but not for others. For user jane, this works fine:

jane@host1$ ssh -v remhost

debug1: Next authentication method: publickey
debug1: Trying private key: /mnt/home/osborjo/.ssh/identity
debug1: Offering public key: /mnt/home/osborjo/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).

for user jack it does not:

jack@host1 ssh -v remhost

debug1: Next authentication method: publickey
debug1: Trying private key: /mnt/home/oper1/.ssh/identity
debug1: Offering public key: /mnt/home/oper1/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive

I have looked at the permissions for all the keys and files, they look the same. Since I am using home directories mounted by NFS, the keys for both the remote host and the local host are in the same directory. This is how things look for jane:

jane@host1$ ls -l $HOME/.ssh

-rw-rw-r--   1 jane    operator     394 Jan 27 16:28 authorized_keys
-rw-------   1 jane    operator    1675 Jan 27 16:27 id_rsa
-rw-r--r--   1 jane    operator     394 Jan 27 16:27 id_rsa.pub
-rw-rw-r--   1 jane    operator    1205 Jan 27 16:46 known_hosts

For user jack:

jack@host1$ ls -l $HOME/.ssh

-rw-rw-r--   1 jack    engineer    394  Jan 27 16:28 authorized_keys
-rw-------   1 jack    engineer    1675 Jan 27 16:27 id_rsa
-rw-r--r--   1 jack    engineer    394  Jan 27 16:27 id_rsa.pub
-rw-rw-r--   1 jack    engineer    1205 Jan 27 16:46 known_hosts

As a last ditch effort, I copied the authorized_keys, id_rsa, and id_rsa.pub from jill to jack, and changed the username in authorized_keys and id_rsa.pub with vi. It still did not work. It seems there is something different between the two users but I cannot figure out what it is.

© Server Fault or respective owner

Related posts about linux

Related posts about ssh