I'm executing a script connecting via password-less SSH on a remote host. I want to set a timeout, so that if the remote host is taking an infinite time to run, I want to come out of that ssh session and continue other lines in my sh script.
How can I set a timeout?
ssh
session" (question "How to increase SSH Connection timeout?"), this is the wrong place. The answer is at this link about ssh-timeout.