Force tty (stdin) closed on ssh commands.

Adding the -n to the ssh command forces ssh to redirect stdin from /dev/null
and prevents the remote processes from blocking waiting for user (tty) input.

Change-Id: Ic659c951926e81eacb0db72c6ff0668b5bd38167
This commit is contained in:
Scott Daniels 2013-09-05 10:53:15 -04:00
parent a5c4ac10f7
commit 9014b2388e
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ def ssh(uri, cmd, screen_output=False, silent=True, agent_forwarding=False):
port = 22
## construct flags
flags = ['-T']
flags.append('-n') # prevent read blocking on tty (stdin)
if silent:
flags.append('-o StrictHostKeyChecking=no')
flags.append('-o UserKnownHostsFile=/dev/null')