0

I am trying to set up an MPI cluster, following Setting Up an MPICH2 Cluster in Ubuntu tutorial.

At the end of step 7, it says that I should not receive a password request, which unfortunately is not the case.

gsamaras@pythagoras:~$ ssh geomcomp.com hostname
gsamaras@geomcomp's password: 

I have edited ~/.bashrc as instructed from the tutorial.

14
  • whats the permission of the file authorized_keys ?
    – heemayl
    May 25, 2015 at 21:45
  • Check with ssh -vvv
    – heemayl
    May 25, 2015 at 21:47
  • @heemayl I edited my post with the requested information.
    – gsamaras
    May 26, 2015 at 9:02
  • Permissions on .ssh and authorized_keys should be 600. Look into sshd logs on the server, you'll probably find it complaining about something like "... file is world readable ...".
    – Fiisch
    May 26, 2015 at 9:40
  • @Fiisch I admit I do not know how to look at them. Should I change them like the 3rd answer in the linked question?
    – gsamaras
    May 26, 2015 at 9:41

1 Answer 1

1

The guide assumes that you are using /mirror as your home directory on all cluster nodes (as well as on the master node, which is ub0 for the guide and pythagoras for you).

If you are not using /mirror as your home directory (or, more precisely, if your home directory is not shared among all nodes), the following line:

mpiu@ub0:~/.ssh$ cat id_rsa.pub >> authorized_keys

will simply add your key to the list of authorized keys on ub0 (i.e. on pythagoras).

If your home directory is not shared among nodes, you need to add your public key to the authorized_keys file on each node.

One way of doing this is to use ssh-copy-id:

ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

and similarly for all other nodes

Note: At the beginning of step 7, the guide assumes you are creating a user named mpiu on all nodes, whose home directory is /mirror. It doesn't, however, tell you how to do so.

9
  • Damn, I want to follow the guide closely. I did a cd /mirror and it hanged up. mpiu did not work for me, because it said that the name did not exist, thus I used mine, gsamaras.
    – gsamaras
    May 26, 2015 at 10:45
  • If I also do only the root, I get the same gsamaras@pythagoras:~$ cd / gsamaras@pythagoras:/$ ls hangs up
    – gsamaras
    May 26, 2015 at 10:50
  • Probably I should ask a new question for the /mirror, because, even though I remember creating it, I can't acess it. Shouldn't I be able to access it?
    – gsamaras
    May 26, 2015 at 11:36
  • If you created /mirror on pythagoras, then you should be able to access it at least from there. If you can't, then check its permissions (ls -la /mirror). Once you can access it correctly from there you should see if it's mounted correctly on the other nodes (see if it appears in the output of gsamaras@geomcomp:~$ sudo mount)
    – lgpasquale
    May 26, 2015 at 12:03
  • Can't do that either. Asked a new question here: askubuntu.com/questions/628419/cd-mirror-freezes and then hopefully, I can get back here and I hope, accept your answer.
    – gsamaras
    May 26, 2015 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .