Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2011
Problems with timeout and ssh -t -t in bash script
The following works fine from the shell and from within the bash script:
timeout 100m ssh <destination> echo hi
timeout 100m ssh -t <destination> echo hi
timeout 100m ssh -t -t <destination> echo hi
However, if I put the timeout inside a bash script, the first line above works well but as soon as I add a -t flag, the script appears to hang instead of running the command on the remote server. I can't even ^C out of it. The remote server does not start ever start executing the command sent (verified by sending a long running script, watching the local bash script with the timeout hang, and seeing the remote server *not* running that process at the same time).
Any ideas of why this his happening? Any suggestions for solutions?