ssh control from Python
A.T.Hofkamp
hat at se-46.wpa.wtb.tue.nl
Mon Aug 6 13:09:20 EDT 2001
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.
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.
Albert
--
Constructing a computer program is like writing a painting
More information about the Python-list
mailing list