ssh -n user@server "command"
Showing posts with label scripting. Show all posts
Showing posts with label scripting. Show all posts
Saturday, May 5, 2012
ssh breaks the while loop ssh breaks the while loop
I created a script that will execute command on the remote server using a ssh. Basically, you will command ssh user@server "command". However, ssh keeps on breaking the loop and it only takes action on the first line of the output. I discovered that it needs to stop reading from stdin. So I put -n on my ssh command and while loop is now ok.
Subscribe to:
Posts (Atom)