Python and ssh for remote login

Noah noah at neo.co.tz
Thu Oct 6 12:32:20 EDT 2016


On 6 Oct 2016 04:56, "Michael Torrie" <torriem at gmail.com> wrote:
>
> On 10/05/2016 11:46 AM, Noah wrote:
> > Hello folk,
> >
> > I would like to use a python script to ssh into a server using a
username
> > and password and perhaps ass port.
> >
> > Any ideas on how to script that.
>
> If paramiko doesn't fit your needs, traditionally this sort of work was
> done with the pexpect module for drying a TTY. There is a submodule of
> pexpect called pxssh for automating things.
>

Hi Micheal

Thank youn for your suggestion. I played around with paramiko today and the
results are owesome.

> http://pexpect.readthedocs.io/en/stable/api/pxssh.html
>
> Note that pexpect uses your normal ssh binary.  Paramiko is a complete
> implementation of the ssh protocol in python.  Both modules are useful
> and fill certain needs.

So i  am going to also try pexpect and everything pexpect and i will let
you know.

Thank you so much

Noah



More information about the Python-list mailing list