Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Re: Remoting over SSH

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


wuwei23 at gmail

Jul 7, 2009, 7:52 AM

Post #1 of 2 (152 views)
Permalink
Re: Remoting over SSH

On Jul 8, 12:46 am, Hussein B <hubaghd...@gmail.com> wrote:
> I want to perform commands on a remote server over SSH.
> What do I need?

Take a look at pexpect: http://pexpect.sourceforge.net/pexpect.html
--
http://mail.python.org/mailman/listinfo/python-list


usernet at ilthio

Jul 7, 2009, 7:58 AM

Post #2 of 2 (144 views)
Permalink
Re: Remoting over SSH [In reply to]

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

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.