tmp_in, tmp_out, tmp_script = __copyFiles(params.user, params.machine, script, sa_obj.args or [], sa_obj.out or [])
# execute command on the remote SALOME application
- command = "ssh %s@%s %s/salome shell " % (params.user, params.machine, params.directory)
+ command = "%s/salome shell" % (params.directory)
if params.port:
- command = command + "-p %s "%params.port
- command = command + " %s %s args:%s"%(header, tmp_script, ",".join(tmp_in))
+ command += " -p %s "%params.port
+ command += " %s %s args:%s"%(header, tmp_script, ",".join(tmp_in))
+ # salome shell command must run in a login shell because of module function
+ command = "ssh %s@%s -t 'bash -l -c \"%s\"'" % (params.user, params.machine, command)
print('[ SSH ] ' + command)
os.system(command)