How do i use ssh in pyhton.
Wayne
piercew at hushmail.com
Fri Aug 10 08:15:55 EDT 2001
"trong anh tran" <trong-anh.tran at wanadoo.fr> wrote in message news:<9ktfa3$nuf$1 at reader1.imaginet.fr>...
> 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
files.
> 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
Authentication.
Wayne
--
[1] http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
[2] http://www-106.ibm.com/developerworks/library/l-keyc?t=gr,p=RSA-DSA
More information about the Python-list
mailing list