Permalink
Browse files

sshdriver: change "-f" option for SSH master to "-n"

This fixes some strange ssh behavior for me where the ssh master seems
to go to background too early (I'm missing 2 debug messages in those
cases) sometimes (about every 20 tries) on some machines and I then get
connection refused errors when trying to connect via the control socket.

Signed-off-by: Tobi Gschwendtner <tg@bloks.de>
  • Loading branch information...
tgbloks authored and jluebbe committed Jan 11, 2018
1 parent 48c1596 commit 465eb2093041699fa8b877dd9eaf506514b36c1a
Showing with 1 addition and 1 deletion.
  1. +1 −1 labgrid/driver/sshdriver.py
@@ -52,7 +52,7 @@ def _start_own_master(self):
)
# use sshpass if we have a password
sshpass = "sshpass -e " if self.networkservice.password else ""
args = ("{}ssh -f {} -x -o ConnectTimeout=30 -o ControlPersist=300 "
args = ("{}ssh -n {} -x -o ConnectTimeout=30 -o ControlPersist=300 "
"-o UserKnownHostsFile=/dev/null "
"-o StrictHostKeyChecking=no -MN -S {} {}@{}").format(
sshpass, self.ssh_prefix, control,

0 comments on commit 465eb20

Please sign in to comment.