Re: python connect to server using SSH protocol

2005-02-09 Thread Toby Dickenson
On Tuesday 08 February 2005 13:26, Simon Anders wrote: > This is what I was about to reply as well. But I did a short test > program and encountered a problem: > > import os > fi, foe = os.popen4 ('ssh dopey') > print >>fi, 'ls' > fi.close () # <-- this is annoying > for line in foe: > prin

Re: python connect to server using SSH protocol

2005-02-08 Thread Martin Franklin
Simon Anders wrote: Hi Laszlo Zsolt Nagy wrote: [EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? There should be a better way. Simon There is : pexpect! http://pexpect.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: python connect to server using SSH protocol

2005-02-08 Thread Kartic
[EMAIL PROTECTED] wrote: > How can python connect to server which use SSH protocol? > Is it easy since my python has to run third party vendor, write data, > read data inside the server (supercomputer). > > Any suggestion? > > Sincerely Yours, > Pujo Aji Pujo, There are two Python oriented SSH s

Re: python connect to server using SSH protocol

2005-02-08 Thread Laszlo Zsolt Nagy
import os fi, foe = os.popen4 ('ssh dopey') print >>fi, 'ls' fi.close () # <-- this is annoying for line in foe: print line, foe.close () The above connects to a server, passes the command 'ls', which is executed there, and prints the returned result. However, reading from foe succeeds only

Re: python connect to server using SSH protocol

2005-02-08 Thread Simon Anders
Hi Laszlo Zsolt Nagy wrote: [EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). In advance, I'm not sure if I understood your problem. SSH is clearly

Re: python connect to server using SSH protocol

2005-02-08 Thread P
[EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). Any suggestion? you can use popen around the ssh binary. You man need the pty module if you want to de

Re: python connect to server using SSH protocol

2005-02-08 Thread Laszlo Zsolt Nagy
[EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). In advance, I'm not sure if I understood your problem. SSH is clearly a remote shell. You will be

python connect to server using SSH protocol

2005-02-08 Thread [EMAIL PROTECTED]
How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). Any suggestion? Sincerely Yours, Pujo Aji -- http://mail.python.org/mailman/listinfo/python-list