0
I’ve been interacting with a server within a program I’m doing using the os.system() function as if I were using the console itself.
os.system("ssh [email protected] 'comando a ser realizado'")
For everything I had done before (create folders, move files and things in the genre) this function was working, now when I do.
os.system("ssh [email protected] 'python programa.py'")
He seems to have launched the program, but gives no feedback, and it seems to be even running.
Maybe the library
fabric
help you with something– Woss
program.py is on the target server or the server that is running ssh.
– Joao Vitorino
Add the argument
-t
that will work. Example:os.system("ssh -t [email protected] 'python programa.py'")
– Fernando Silveira