Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am planning to build a small cluster for parallel computing. The first step would be to make sure all the machines can communicate with each other without requiring password. Now I am experiencing problem with the regular method of RSA shared key authentication method, since the /home is shared for all machines from a NFS filesystem. Thus, I do not understand how to distinguish the id_rsa file generated by ssh-keygen for all different machines.
Can anybody suggest what would be the most efficient way of achieving my goal? That method should work together with OpenMPI job submission.
typically, one of the things that needs to happen for passwordless ssh connections is to copy id_rsa.pub into .ssh/authorized_keys on the remote server. Since this is a shared home dir, perhaps you should simply 'cp id_rsa.pub authorized_keys'?
typically, one of the things that needs to happen for passwordless ssh connections is to copy id_rsa.pub into .ssh/authorized_keys on the remote server. Since this is a shared home dir, perhaps you should simply 'cp id_rsa.pub authorized_keys'?
Yes, but there should be a unique pair of private/public key combination: id_rsa and id_rsa.pub. Note that I shall need to have about 30 machines communicating with each other. Since every key fingerprint contains unique hostname in the .pub file, I shall have to add the public key of each node to the authorized_keys file. That's doable, but the problem is that there can be only one id_rsa private key in that folder (if I am not wrong).
I hope that I could clarify my problem/confusion better this time.
While there is a comment field in the .pub file that is typically user@host, I dont believe there is any hostname tied to the key pair (in a meaningful way). You should be able to copy a user's ssh keys from machine to machine with no consequence.
Since every server is sharing the same ~/.ssh directory, I think it would be sufficient to copy the .pub file to authorized_keys. If it would make things appear cleaner, you could edit the comment field in the .pub file to simply be user (instead of user@host).
Actually I was skeptic because initially it was not working, but that was due to some kind of ownership problem. A "chown -R suman:suman" on my home directory solved the problem!
Cool! Yes - when it comes to key logins, ssh has some strict policies on the file permissions and ownership on the .ssh folder and files. I glad everything worked out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.