LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-14-2009, 02:29 AM   #1
sumanc
LQ Newbie
 
Registered: Mar 2004
Location: Bangalore, India
Distribution: Ubuntu 9.04, Fedora 10
Posts: 23

Rep: Reputation: 15
Question ssh without password for /home shared over NFS


Hi,

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.

Thanks.
 
Old 05-14-2009, 03:29 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
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'?
 
Old 05-14-2009, 06:16 AM   #3
sumanc
LQ Newbie
 
Registered: Mar 2004
Location: Bangalore, India
Distribution: Ubuntu 9.04, Fedora 10
Posts: 23

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by Admiral Beotch View Post
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.
 
Old 05-14-2009, 06:32 AM   #4
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
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).
 
Old 05-15-2009, 03:13 AM   #5
sumanc
LQ Newbie
 
Registered: Mar 2004
Location: Bangalore, India
Distribution: Ubuntu 9.04, Fedora 10
Posts: 23

Original Poster
Rep: Reputation: 15
Thumbs up

It worked. Thank you very much!

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!
 
Old 05-15-2009, 08:39 AM   #6
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
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!
 
  


Reply

Tags
nfs, ssh public key, sshkeygen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passwordless SSH on machines which have the same NFS home region cmetelko Linux - Software 1 06-18-2007 09:35 AM
LXer: Securing NFS - Tunneling NFS over SSH LXer Syndicated Linux News 0 09-27-2006 02:03 PM
how can i move this folder of music from /root/Shared to /home/coffee/Shared ? thx mr_coffee Linux - Newbie 9 01-23-2006 06:50 AM
want to ssh/ftp to home machine (Slack) from office through home router fincher69 Linux - Networking 2 09-21-2005 10:55 PM
Help! ssh to home desktop is listening but not accepting password vrooje Linux - General 10 01-02-2005 08:22 PM


All times are GMT -5. The time now is 09:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration