@@ -243,12 +243,12 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
243243 self ._read_output_buffer (_stderr ,
244244 prefix = '\t [err]' )
245245 if sudo and not user :
246- command = 'sudo -S bash -c "%s" ' % command .replace ('"' , '\\ "' )
246+ command = 'sudo -S bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
247247 elif user :
248- command = 'sudo -u %s -S bash -c "%s" ' % (
248+ command = 'sudo -u %s -S bash -c \' %s \' ' % (
249249 user , command .replace ('"' , '\\ "' ),)
250250 else :
251- command = 'bash -c "%s" ' % command .replace ('"' , '\\ "' )
251+ command = 'bash -c \' %s \' ' % command .replace ('"' , '\\ "' )
252252 logger .debug ("Running command %s on %s" , command , self .host )
253253 channel .exec_command (command , ** kwargs )
254254 logger .debug ("Command started" )
@@ -323,7 +323,7 @@ class ParallelSSHClient(object):
323323
324324 def __init__ (self , hosts ,
325325 user = None , password = None , port = None , pkey = None ,
326- forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 10 ,
326+ forward_ssh_agent = True , num_retries = DEFAULT_RETRIES , timeout = 120 ,
327327 pool_size = 10 , proxy_host = None , proxy_port = 22 ):
328328 """
329329 :param hosts: Hosts to connect to
0 commit comments