ssh control from Python

Chuck Esterbrook Chuck at StockAlerts.com
Mon Aug 6 12:07:19 EDT 2001


At 07:09 PM 8/6/2001 +0200, A.T.Hofkamp wrote:
>In comp.lang.python, you wrote:
> >I'm trying to control ssh from Python using pty. I have made some progress.
> >For example, if I send the wrong password, I get a message back saying so.
> >However, after sending the correct password, sent commands just get echoed
> >back to me.
>
>Looks like you're trying to solve 2 things here:
>1) Convince ssh to work
>2) Convince it to exec commands
>
>I'd suggest to first use your own shell program (e.g. /bin/bash) instead of
>ssh, to see whether you can get it to execute commands.

I solved the problem. Hopefully this week I will be able to sum up the 
results and post them back to c.l.p.


>Second, why are you trying to feed a password to ssh ?
>You can configure ssh such that it does not need a password to log in.

I wanted to support both.


-Chuck





More information about the Python-list mailing list