Feb 19, 2010

using SSH protocol within python -> paramiko

For a script, I had to connect to a remote host using the ssh protocol.

The ssh implementation for python is in paramiko.

Paramiko needs also the Crypto Module.

For Solaris 10 I downloaded both packages, compiled and installed both
without problems. The command sequence for both packages are:

python setup.py build 
python setup.py install

After this python can be started and paramiko imported:
>>> import paramiko
A nice and helpful tutorial can be found here by Jesse Noller.

A simple start would be:
>>> ssh=paramiko.SSHClient()                                    
>>> ssh.connect( "127.0.0.1", username="ewer", password="test" )  
There is also an SFTP client for file transfer available.