Hi !
The school in which I happen to study has a network of around 500 computers. Running under Linux (yeheee !).
So I thought I could use this network like a cluster to run heavy computations (like 3D video rendering, etc.), using ssh.
I wrote a script that looks like this (the computers are named on the network a1, a2, ..., b1, b2, ...) to connect to all the computers named a* :
Code:
for ((i=0; i<25; i++)); do
ssh a$i command
done
The problem was that it always asked my password. So I used ssh-keygen to generate a key that I added to ~/.ssh/authorized_keys, and as my home folder is shared over the network, this solved the problem, I can now connect without typing any password.
Now I still have a problem :
Each time I try to connect to a new computer, ssh looks in ~/.ssh/known_hosts and if the host isn't listed there, it asks :
Code:
The authenticity of host 'a1 (xxx.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is f7:3f:6c:5c:...:16:c4:64:f4:2e:b6.
Are you sure you want to continue connecting (yes/no)?
Then, if I type "yes", the host is added to known_hosts.
I really wouldn't like to type "yes" 500 times for the first connection on each computer, so the question is :
Is there a way to tell ssh to automatically add the host to known_host and not ask if we're sure we want to connect ?
Or, how can I get from the command-line a host's key, so that I can add it manually to known_hosts ?
Thanks in advance !