LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to setup password less ssh for all the user in the cluster (https://www.linuxquestions.org/questions/linux-networking-3/how-to-setup-password-less-ssh-for-all-the-user-in-the-cluster-4175538154/)

ztdep 03-29-2015 07:59 AM

how to setup password less ssh for all the user in the cluster
 
Dear friends:
I can setup a password less ssh for a single user. but if we have many users in the clusters with 100 nodes to perform computations.
Could you please give me some suggestions about how to realize the password-less ssh for all these users in all nodes.
Regards

T3RM1NVT0R 03-29-2015 08:19 AM

I know manual way will be too hectic but if you do not have a centralized server which has got sudo / root access to all VMs to push / run ssh-copy-id then it will be very difficult.

The key to implement such setup is to have a centralized server which can push keys to all the boxes. Then you can write a script to push the keys.

Another way I can think of is distributing authorized_keys file is via puppet but I am not sure how feasible it will be for you if already not in place in your infra.

If you do not have a centralized server with access to all nodes then it will be a hectic and painful job.

jpollard 03-29-2015 08:20 AM

It usually depends on the users home filesystem.

The list of known nodes, and authorized keys (the user would have to generate one) are stored in the users home directory (.ssh/. If the users home directory is accessible via all the nodes (usually would be), then the list of nodes would allow a user to access all of them without a password. The authorized keys would automatically be available via the home directory mount.

The configuration of each node would have to allow for RSA authentication and PubkeyAuthentication (both are usually the default).

The only pain is getting the "known hosts" to include all the keys for each node.
This could be done once by the admin, then added to the skeleton structure used when adding users to the front end nodes. This would immediately give the user access to all nodes.

Access to the users home directory is usually done by NFS, but using gluserfs is an alternative (and for clusters, it might be faster as it allows for multiple servers to distribute the I/O load).


All times are GMT -5. The time now is 03:15 PM.