Friday, July 6, 2007

One way password less SSH

For user who has to have password less SSH between two hosts, all files in .ssh folder of both hosts must have the same permission attributes:
-rw-r--r-- 1 grid-user grid-user 867 Jul 6 13:51 authorized_keys
-rw------- 1 grid-user grid-user 668 Jun 27 15:27 id_dsa
-rw-r--r-- 1 grid-user grid-user 618 Jun 27 15:27 id_dsa.pub
-rw------- 1 grid-user grid-user 883 Jun 27 15:27 id_rsa
-rw-r--r-- 1 grid-user grid-user 238 Jun 27 15:27 id_rsa.pub
-rw------- 1 grid-user grid-user 554 Jun 27 15:27 identity
-rw-r--r-- 1 grid-user grid-user 358 Jun 27 15:27 identity.pub
-rw-r--r-- 1 grid-user grid-user 918 Jun 27 15:02 known_hosts
In my case I could ssh from ng2 to bestgrid-02 but not back. After Anton's suggestion I found out that on ng2 file authorized_keys had -rw-rw-r-- permissions. After changing to -rw-r--r-- I could ssh from bestgrid to ng2 without password.

No comments: