for i in `cat list` do ssh -o "BatchMode yes" root@$i hostname done
ssh to a list of hosts and run the hostname command to verify you can ssh to the hosts password-lessly. If password-less login is not working, it will not prompt for passphrase or password and will skip it.
man ssh_config
BatchMode
If set to “yes”, passphrase/password querying will be disabled. This option is useful in scripts and other batch jobs where no user is present to supply the password. The argument must be “yes” or “no”. The default is “no”.
Advertisements