Re: Using Python to run SSH commands on a remote server

2008-06-25 Thread Taygun Kekec
Alson you can take a look at pexpect module if you want to automate logging in and process commands , in this way you will no longer wait for loginname and password prompt. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread subeen
On Jun 24, 3:51 am, John Salerno <[EMAIL PROTECTED]> wrote: > Jeffrey Froman wrote: > > Also note that "all .py files on my web server" is not necessarily > > restricted to CGI scripts -- and therein lies the real gist of my > > cautionary note. > > Yeah, I realized that afterwards. Good point. I w

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
Jeffrey Froman wrote: Also note that "all .py files on my web server" is not necessarily restricted to CGI scripts -- and therein lies the real gist of my cautionary note. Yeah, I realized that afterwards. Good point. I was assuming all my executable files would be CGI, but that's not a good

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jeffrey Froman
John Salerno wrote: > I guess a blanket process might be a tad risky, but don't you want all CGI > files to be executable by all? Typically, I prefer CGI scripts to be executable only the owner. If the web server runs those scripts as a different user, then that user must also be permitted to exe

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Grant Edwards
On 2008-06-23, John Salerno <[EMAIL PROTECTED]> wrote: > Generally speaking, what tools would I use to do this? In shell scripts I use expect to automate ssh stuff, so I would probably give pyexpect or pexpect a try: http://sourceforge.net/projects/pexpect/ > Is there a built-in module for it

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
"Jeffrey Froman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Be careful, this procedure sounds potential risky, security-wise ;-) I guess a blanket process might be a tad risky, but don't you want all CGI files to be executable by all? -- http://mail.python.org/mailman/listi

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jeffrey Froman
John Salerno wrote: > Generally speaking, what tools would I use to do this? Is there a built-in > module for it? I've had a very nice experience using the 3rd-party package "paramiko" for ssh communication. There's nothing in the standard library that I know of. > I looked at the telnetlib modu

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Mark Wooding
John Salerno <[EMAIL PROTECTED]> wrote: > Generally speaking, what tools would I use to do this? Is there a built-in > module for it? There's paramiko (q.g.). I can't personally vouch for it, but it seems popular... It seems to depend on a separate crypto library. > Is Telnet and SSH even th

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jean-Paul Calderone
On Mon, 23 Jun 2008 13:30:55 -0400, John Salerno <[EMAIL PROTECTED]> wrote: Generally speaking, what tools would I use to do this? Is there a built-in module for it? I looked at the telnetlib module, but the documentation wasn't really complete enough for me to get a good idea of it. Is Telnet an

Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
Generally speaking, what tools would I use to do this? Is there a built-in module for it? I looked at the telnetlib module, but the documentation wasn't really complete enough for me to get a good idea of it. Is Telnet and SSH even the same thing? Basically, I want to write a script that will a