Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 30, 2005, 5:55 pm
rate this thread
I run ssh in batch mode. I have a central server and from that system I
can run a command on every server across the landscape using a script
that just runs each ssh in turn, running the next one after the
previous one has completed. We have about 100 servers here so if I run
a batch command, I run 100 ssh commands in turn. Occasionally, I find
that some ssh commands hang. If one ssh hangs, it means the rest ssh
commands after this one will have to wait for it out of hang. Some of
the hangs are due to the shut-down of the servers while others due to
unknown reasons. For whatever reasons, I wonder whether there is way to
tell a ssh command to stop trying after certain time, say 5 seconds, of
trying? Thank you for any help.
- Richard E. Silverman
November 30, 2005, 7:19 pm
Re: How to skip a ssh command that hangs in a batch script?
Try using shmux or maybe global - that way you'll be in more control...
Dave Abbott, UNIX SysAdmin |
Department of Computer Science | http://www.dcs.shef.ac.uk /
The University of Sheffield |
- » protocol question - issue with exit-status inside unfinished data stream?
- — Newest thread in » Secure Shell Forum