Sei sulla pagina 1di 3

SS-SI Install Paramiko

Applies to: Software Services – Strategic Initiatives

Objective: Installation of Python Paramiko module offline

Developed By KALYANKAR, VINAY(vinay.kalyankar@capgemini.com)

Reviewed By

Modified By

Introduction
Paramiko: A Python Library for implementation of the SSHv2 protocol, providing both client and server
functionality. While it leverages a Python C extension for low level cryptography (Cryptography),
Paramiko itself is a pure Python interface around SSH networking concepts. Detailed usage and API
documentation can be found at our code documentation site, docs.paramiko.org.

Pre-requisites:
 Python must be installed on the server (recommended version 2.6.6, other compatible versions
are 2.6.x or 2.7.x)
 OS level gcc libraries must be installed. (rpm –qa | grep –i gcc)
 C++ libraries for Python must be installed.

Types of Installation:
There are two ways to install Python Paramiko library. Below are the details
 Online installation
 Offline installation

Online Installation:
For online installation the server must have connected to internet. We can use the default Python
Library installation tools such as pip or easy_install or anaconda. In this document we will be using pip,
the PyPA recommended tool for installing Python packages. Pip resolves all the dependencies and
installs the Python libraries along with all the dependent libraries downloads from
https://pypi.org/project/paramiko

1|Page
SS-SI Install Paramiko

The command to install Paramiko using pip is as below:


pip install paramiko
Reference: http://www.paramiko.org/installing.html

Offline installation:
These are the steps for offline installation. Before proceeding with Paramiko installation, look for the
Dependencies Installation section, since installation of Paramiko is offline, the dependencies must be
downloaded manually and installed.
Download the source library zip files:
 Download all the source library zip/tar files from https://pypi.org/project/paramiko/
 Copy the source zip/tar file to the destination server (/tmp folder)
 Untar/unzip the source library in the destination server
Execute the installation command:
 Change Directory (cd /tmp/paramiko) to the folder where all the source library files exists.
 Look for the file “setup.py”
 Execute the installation command as below:
o python setup.py install

Verify installation:
 Enter into the python prompt by typing “python” on the terminal.
 Verify the paramiko installation by typing the below command
o import paramiko

2|Page
SS-SI Install Paramiko

Dependencies installation:
Below are the dependent Python libraries for Paramiko:
 setuptools, ctypes, pycparser, ordereddict, idna, pyasn1, six, enum34, ipaddress, cffi,
cryptography.
 The above python modules/libraries should installed as these are the pre-requisites for
Paramiko.
 They can be downloaded from the https://pypi.org into the server and installed by using the
below steps.

Download the source libraries from the below links:


 https://pypi.org/project/setuptools
 https://pypi.org/project/ctypes/
 https://pypi.org/project/pycparser/
 https://pypi.org/project/ordereddict/
 https://pypi.org/project/idna/
 https://pypi.org/project/pyasn1/
 https://pypi.org/project/six/
 https://pypi.org/project/enum34/
 https://pypi.org/project/ipaddress/
 https://pypi.org/project/cffi/
 https://pypi.org/project/cryptography/

Copy all the downloaded libraries to the target server:


 Copy all the source libraries zip/tar files to the target server (/tmp folder).
 Unzip/Untar the files in the destination.
 Each source folder contains setup.py file which is used for installation of library from source.
 Run the below command after cd to the each folder:
o python setup.py install
 After successful installation of all the dependent libraries, install the paramiko library.

3|Page

Potrebbero piacerti anche