Scripting SSH with Python

Lenny Self lenny at squiggie.com
Thu Oct 26 12:14:49 EDT 2000


Thanks for your help everyone...

I ended up just using the RSA key to authenticate... it was much easier.

    -- Lenny


"Stian Husemoen" <stianh at ifi.uio.no> wrote in message
news:slrn8vd50s.nt9.stianh at localhost.localdomain...
> Lenny Self wrote:
> >help.  When I make the SSH connection I am prompted to enter a
password...
> >my problem is that I don't know how to look for this promt and have the
> >script submit the password for me.  Can anyone give me some help on this.
> >
> >I have been experimenting with os.popen and os.popen3 but I am either
> >looking in the wrong spot or I am not doing it correctly.
> >
> >Any help would be greatly appriciated.
>
> SSH needs to speak to a pty if I remember correctly. It dies on you if it
> don't. You have to use the pty package.
>
> I did something like this a while back, but I can't seem to find my old
> code, so I can't give you an example, sorry.
>
> --
>
> Stian Husemoen <stianh>





More information about the Python-list mailing list