I might be inclined (have done, in fact) to use a python ssh implementation
to do this, rather than using shell.
paramiko would be one such module, 'spur' module is easier to use. Not
using shell gives the python greater control over error handling and
recovery, among other things.
Of course,
please try in your controller :
import subprocess
def ssh_script():
command = "applications/administrator/static/script/linux/ssh.sh"
proc = subprocess.Popen(command, stdout = subprocess.PIPE, stderr =
subprocess.PIPE)
output, err = proc.communicate()
return locals()
best regards,
stifan
--
Re
2 matches
Mail list logo