add a -T option for setting ssh timeout in seconds

This commit is contained in:
Christopher Johnston 2012-03-01 16:54:17 -08:00
commit d15172abdc
2 changed files with 4 additions and 1 deletions

View file

@ -117,7 +117,7 @@ class Runner(object):
try:
# try paramiko
ssh.connect(host, username=self.remote_user, allow_agent=True,
look_for_keys=True, password=self.remote_pass)
look_for_keys=True, password=self.remote_pass timeout=self.timeout)
return [ True, ssh ]
except Exception, e:
# it failed somehow, return the failure string