How do i use ssh in pyhton.

Wayne piercew at
Fri Aug 10 14:15:55 CEST 2001

"trong anh tran" <trong-anh.tran at> wrote in message news:<9ktfa3$nuf$1 at>...
> Hi,

Hello. :-)

> Thank a lot for yours anwers.
> I want to make a conncetion ssh to a server but i don't know how to do.

Do you just want to run a command on the destination server or create
your own SSH client?  When I just want to run a command on the server
I take the easy way out and use a separate client and have my Python
script pass in the parameters.

On Linux I use the commandline ssh client and on Windows I use
Plink[1].  If I need to transfer files I'll use Plink to remotely
compress or prepare the files (c: I'm usually writing a program to ssh
from a Windows machine to a Linux server).  Then I use PSCP, from the
same site, to transfer the files to the local machine or upload the

> I make first a socket connection (port 22) and then encrypt the data? (I'm a
> beginner in Python)

If you want to write your own SSH interface you may want to consider
reading OpenSSH Key Management[2] for information on RSA


More information about the Python-list mailing list