sshnoprompt.html

Previous: foo. Next: rsync.passwords

When you reinstall the cluster, you reinstall ssh! This means that ssh on "master" will complain when you try to connect to these machines that the RSA host key of the newly installed machine has changed, and you will be prompted for confirmation before being able to establish a connection. This of course breaks automaticity (noninteractivity).

To get over this problem there is a script host_clean.sh that will clear out the old RSA host key for a machine. It only works for one machine at a time so far.

	bin/host_clean.sh slave003
will erase the key for slave003 for example.

To clear out all keys at once, simply remove the file $HOME/.ssh/known_hosts. Most likely $HOME would be replaced with /root.

At this point we still do not have proper noninteractive control, since ssh will still prompt you for each access, informing you that you are connecting to an unknown host and requesting you to confirm that you wish to proceed connecting and add the hosts RSA fingerprint to the list of known_hosts.

This is what it looks like:

root@master:~# ssh slave003
The authenticity of host 'slave003 (192.168.2.3)' can't be established.
RSA key fingerprint is e6:36:23:2f:45:19:51:b3:0f:33:40:31:74:c5:26:8f.
Are you sure you want to continue connecting (yes/no)?

To fix this for all the nodes without having to answer each time, use the script $HOME/bin/ssh-no-strict-all.sh. It will connect to each machine with ssh's StrictHostKeyChecking option set to 'no'. This will also automatically add the hosts RSA fingerprint to the known_hosts file if it is not present. Typical usage:

	bin/ssh-no-strict-all.sh uptime
uptime is just an innocuous command. We have to give it something to do or it won't connect at all.

The above operations MUST be performed to automate the rsync.passwords and other scripts.

Peter

Next: rsyncpasswd.html