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:
parent
a5c4ac10f7
commit
9014b2388e
|
@ -77,6 +77,7 @@ def ssh(uri, cmd, screen_output=False, silent=True, agent_forwarding=False):
|
||||||
port = 22
|
port = 22
|
||||||
## construct flags
|
## construct flags
|
||||||
flags = ['-T']
|
flags = ['-T']
|
||||||
|
flags.append('-n') # prevent read blocking on tty (stdin)
|
||||||
if silent:
|
if silent:
|
||||||
flags.append('-o StrictHostKeyChecking=no')
|
flags.append('-o StrictHostKeyChecking=no')
|
||||||
flags.append('-o UserKnownHostsFile=/dev/null')
|
flags.append('-o UserKnownHostsFile=/dev/null')
|
||||||
|
|
Loading…
Reference in New Issue