<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eric Walstad wrote:
<blockquote cite="mid:47C5E126.10307@ericwalstad.com" type="cite">
<pre wrap="">Eric Brunson wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Tom wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have a webfaction server (highly recommended btw) and I'm trying to
use automate some tasks over ssh but I'm not having much luck with
pyssh <a class="moz-txt-link-freetext" href="http://pyssh.sourceforge.net/">http://pyssh.sourceforge.net/</a> .
Some of the docs mention methods that don't exist in the version I
downloaded, such as pyssh.run.
I'm using windows vista (work pc). Any ideas?
</pre>
</blockquote>
<pre wrap="">I've never used pyssh, so I can't comment directly on your problems. We
use paramiko very successfully. It's well documented and has excellent
example code included with the source.
<a class="moz-txt-link-freetext" href="http://www.lag.net/paramiko/">http://www.lag.net/paramiko/</a>
</pre>
</blockquote>
<pre wrap=""><!---->
Also have a look at pexpect which essentially wraps command line calls.
I use it to automate mysql backups on my webfaction account. Here's
the meat of the code:
import pexpect
cmd = "ssh foouser@foohost 'mysqldump --opt -p foodb > foodb.sql'"
child = pexpect.spawn(cmd)
# expect mysql to prompt for a db password
child.expect('Enter password: ')
# send the password
child.sendline("nottherealpassword")
Homepage:
<a class="moz-txt-link-freetext" href="http://www.noah.org/wiki/Pexpect">http://www.noah.org/wiki/Pexpect</a>
It looks like there is now a pexpect SSH module. I've not used it, just
FYI:
<a class="moz-txt-link-freetext" href="http://pexpect.sourceforge.net/pxssh.html">http://pexpect.sourceforge.net/pxssh.html</a>
I hope that helps.
</pre>
</blockquote>
<br>
What's the path to ssh under windows vista? Paramiko is a pure python
implementation of the SSH protocol, so it should run on any platform. <br>
<br>
Besides, IMHO, expect, pexpect, Perl::Expect... the entire concept is a
horrible, horrible kludge and should only be used as a last resort when
no other interface is possible.<br>
<br>
Your mileage may vary,<br>
e.<br>
<br>
<br>
</body>
</html>