-
Notifications
You must be signed in to change notification settings - Fork 1
RunMpiProgramsWithoutRepeatingThePassword
In some MPI installations it is necessary to introduce the user password every time a process is launched. If the MPI is running through ssh, here is some recipe to avoid having to input the password every time.
- Generate a DSA key pair to work with version 2 of the protocol, type the following command at a shell prompt:
ssh-keygen -t dsa
Accept the default file location of ~/.ssh/id_dsa. Enter a passphrase different from your account password and confirm it by entering it again.
- Change the permissions of your .ssh directory using the command
chmod 755 ~/.ssh.
-
Copy the contents of ~/.ssh/id_dsa.pub to ~/.ssh/authorized_keys on the machine to which you want to connect. If the file ~/.ssh/authorized_keys does not exist, you can copy the file ~/.ssh/id_dsa.pub to the file ~/.ssh/authorized_keys on the other machine.
-
For each shell (this is run only once for each kind of shells: tcsh, csh, bash, etc.)
4.1. Launch ssh-agent:
ssh-agent
4.2. Add your identity to the agent
ssh-add (asks for the passwd used in ssh-keygen)
If this command complains about: "Could not open a connection to your authentication agent.", it means that your shell is not running under ssh-agent. You may work around the problem using:
exec ssh-agent tcsh (or your shell of preference)
ssh-add
You may also want to see the information at [http://www.ace.ual.es/mediawiki/index.php/ConfiguraciB3n_de_ssh_sin_password]] (in Spanish).
If the MPI programs start but nothing is done, check that the machine name is correct.
-- Main.CoSS - 02 Apr 2007