Difference between revisions of "Configure ssh for MPI"
Line 1: | Line 1: | ||
− | + | To be able to run the TELEMAC system in parallel on a network of computers via MPI, one has to be able to log in to any of the machines without having to enter a password. This can be done easily with ssh keys. This article describes the methodology to setup password less login vi ssh for MPI applications. | |
− | + | = Principle of key authentication= | |
+ | The principle of key authentication is the following. A keypair consists of private key and a public key | ||
− | + | More info on [http://en.wikipedia.org/wiki/Public_key_cryptography wikipedia]. | |
− | + | = Key generation on master = | |
+ | ssh-keygen -t dsa | ||
+ | |||
+ | Note: if your network of computers for the parallel computations is on a safe private network, you can consider using a blank key. However, this is not recommended and using ssh-agent with a long key is usually the preferred option. | ||
+ | |||
+ | = Copy the key to the slaves = | ||
+ | scp .ssh/id_dsa.pub login@slave01: | ||
+ | ssh slave01 | ||
+ | mkdir .ssh | ||
+ | chmod 0600 .ssh | ||
+ | cat id_dsa.pub > .ssh/authorized_keys | ||
+ | rm -f id_dsa.pub | ||
+ | |||
+ | Now go back to the master node and try to log into slave01. You should be asked for the key this time: | ||
+ | ssh login@slave01 | ||
+ | |||
+ | = Advanced features = | ||
+ | == ssh-agent or using a blank key? == | ||
+ | ssh-agent running | ||
+ | ssh-add | ||
+ | |||
+ | master$ ssh login@slave1 | ||
+ | slave01$ | ||
+ | |||
+ | == List of keys to use == | ||
+ | from "master, slave01, slave02" sdvkms;dflmk |
Revision as of 06:14, 21 August 2007
To be able to run the TELEMAC system in parallel on a network of computers via MPI, one has to be able to log in to any of the machines without having to enter a password. This can be done easily with ssh keys. This article describes the methodology to setup password less login vi ssh for MPI applications.
Principle of key authentication
The principle of key authentication is the following. A keypair consists of private key and a public key
More info on wikipedia.
Key generation on master
ssh-keygen -t dsa
Note: if your network of computers for the parallel computations is on a safe private network, you can consider using a blank key. However, this is not recommended and using ssh-agent with a long key is usually the preferred option.
Copy the key to the slaves
scp .ssh/id_dsa.pub login@slave01: ssh slave01 mkdir .ssh chmod 0600 .ssh cat id_dsa.pub > .ssh/authorized_keys rm -f id_dsa.pub
Now go back to the master node and try to log into slave01. You should be asked for the key this time: ssh login@slave01
Advanced features
ssh-agent or using a blank key?
ssh-agent running ssh-add
master$ ssh login@slave1 slave01$
List of keys to use
from "master, slave01, slave02" sdvkms;dflmk