Hi, I created a number of scripts that step through a file containing server names. It will then run a command through an ssh session on the remote servers. The list of servers is quite long and often an ssh session cannot be established for one reason or another. I am trying to find a way to define a timeout value after which the script will no longer attempt to talk to the server and go on to the next server in the list. How can I accomplish that? Here is part of my script: - - - - - - 8< - - - - - until [ $done ] do read <&3 servername if [ $? != 0 ]; then done=1 continue fi ... cat < bkuplist.$$ |ssh $servername "sudo tar -zcf /tmp/$servername.tar.gz `cat -`" 2> /dev/null scp $servername:/tmp/$servername.tar.gz $ESSPATH/ 2> /dev/null ... done - - - - - - 8< - - - - - Any help is appreciated and thanks in advance.
Lango -- View this message in context: http://www.nabble.com/ssh-timeout-tf3807052.html#a10774519 Sent from the Gnu - Bash mailing list archive at Nabble.com. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash