
usernet at ilthio
Jul 7, 2009, 7:58 AM
Post #2 of 2
(144 views)
Permalink
|
On 2009-07-07, Hussein B <hubaghdadi [at] gmail> wrote: > I want to perform commands on a remote server over SSH. > What do I need? catb.org/esr/faqs/smart-questions.html There are many ways to remote using ssh. If we know what you are trying to do, maybe we could give you a better answer. If you just want to open the python interpreter interactively on another host you can do something like: ssh -t user [at] hos python That will allow you send "commands" to the python interpeter. You could write a script and pipe it into the interpreter: cat script.py | ssh -t user [at] hos python Maybe you want to open an ssh connection and send shell commands from a python script. You can do that using one of the popen2 functions: http://docs.python.org/library/popen2.html -- http://mail.python.org/mailman/listinfo/python-list
|