@@ -238,12 +238,12 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
238238 self ._read_output_buffer (_stderr ,
239239 prefix = '\t [err]' )
240240 if sudo and not user :
241- command = 'sudo -S bash -c "%s" ' % command .replace ('"' , '\\ "' )
241+ command = 'sudo -S bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
242242 elif user :
243- command = 'sudo -u %s -S bash -c "%s" ' % (
243+ command = 'sudo -u %s -S bash -c \' %s \' ' % (
244244 user , command .replace ('"' , '\\ "' ),)
245245 else :
246- command = 'bash -c "%s" ' % command .replace ('"' , '\\ "' )
246+ command = 'bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
247247 logger .debug ("Running command %s on %s" , command , self .host )
248248 channel .exec_command (command , ** kwargs )
249249 logger .debug ("Command started" )
@@ -318,7 +318,7 @@ class ParallelSSHClient(object):
318318
319319 def __init__ (self , hosts ,
320320 user = None , password = None , port = None , pkey = None ,
321- forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 10 ,
321+ forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 120 ,
322322 pool_size = 10 , proxy_host = None , proxy_port = 22 ):
323323 """
324324 :param hosts: Hosts to connect to
0 commit comments