Using python with SSH?

Paul Rubin http
Wed Dec 17 18:07:12 EST 2003


Steve <nospam at nopes> writes:
> ssh -l user host "/path/to/program"
> 
> prompts for a password and I don't know how to supply one via a python
> script. Is there an easy way out? Can I log onto to the other machine
> via ssh somehow? Does a python script support this? Thanks!

The simplest way is to set up ssh at both ends with RSA authentication
and have a private key on the local machine.  That gets rid of the
need for a password, while still keeping the connection secure, as
long as the local machine is secure.




More information about the Python-list mailing list