Wednesday, March 30, 2011

Installing paramiko for windows

How to Install paramiko for Windows?

Recently, I came across a situation where I had to do some ssh related work on Windows.
Paramiko is a great option and honestly one of the viable options, besides of course, Twisted. I still haven't waded those waters in Windows but a tutorial on that is due in some time ;)

Please keep in mind to ensure you download the relevant versions matching your python installation and Windows version (32 or 64).
This goes without saying that you will need Python to be installed. Check this link: Download Python here

1. Download paramiko for windows. You get the zip file:
Paramiko for windows

2. To build it you need the dependency package pycrypto. Again keep in mind you will need a matching version of pycrypto for your Python. This is a built version of Windows so no install is required. Check here

3. You could do an easy_install by downloading setuptools but I ran into some issues so I chose to download MinGW tool. This is again an installation and no build is required. Available here

4. Once you have pycrypto and MinGW installed on your windows machine, just browse to the folder where you extracted the paramiko module from the zip file and issue this command:
python setup.py build --compiler=mingw32 bdist_wininst
TADA! You are all set to use ssh on your windows machine with Python.

For demo scripts check out the demo folder in paramiko or for documentation here: Click here