@@ -237,12 +237,12 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
237237 self ._read_output_buffer (_stderr ,
238238 prefix = '\t [err]' )
239239 if sudo and not user :
240- command = 'sudo -S bash -c "%s" ' % command .replace ('"' , '\\ "' )
240+ command = 'sudo -S bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
241241 elif user :
242- command = 'sudo -u %s -S bash -c "%s" ' % (
242+ command = 'sudo -u %s -S bash -c \' %s \' ' % (
243243 user , command .replace ('"' , '\\ "' ),)
244244 else :
245- command = 'bash -c "%s" ' % command .replace ('"' , '\\ "' )
245+ command = 'bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
246246 logger .debug ("Running command %s on %s" , command , self .host )
247247 channel .exec_command (command , ** kwargs )
248248 logger .debug ("Command started" )
@@ -317,7 +317,7 @@ class ParallelSSHClient(object):
317317
318318 def __init__ (self , hosts ,
319319 user = None , password = None , port = None , pkey = None ,
320- forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 10 ,
320+ forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 120 ,
321321 pool_size = 10 , proxy_host = None , proxy_port = 22 ):
322322 """
323323 :param hosts: Hosts to connect to
0 commit comments