The use of SSH in Python requires openssh, and OpenSSH relies on the Paramiko module, and the Paramiko module relies on the Pycrypto module, so to use SSH in Python, you need to first install the module order: Pycrypto- > ECDSA, Paramiko
1, installation Pycrypto
Installing this is cumbersome and requires local compilation, and there is a lot of configuration for VS or GCC, and it's not necessarily possible to compile successfully. (Can search the installation steps on the Internet)
Error Description:
when installing from source code Python module encountered this error. But I clearly downloaded and installed the Microsoft Visual C + + Compiler package for Python 2.7 from the official website and configured the environment variable path.
cause of error:
The reason for this error is that the msvc9compiler.py in the Python distutils module does not look for ' vcvarsall.bat ' in the path specified by the environment variable, but rather through the registry to find ..., however, it is not known why the compiler installation process did not configure the registry.
Workaround:
As long as the registry is configured manually, it is OK.
1. Open Registry Editor
Run regedit
2. Configuration
2.1. If the python you are installing is 32-bit, create the followingItems:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Setup\VC
2.2. If the python you are installing is 64-bit, create the followingItems:
HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC
3, and new under this itemString Value:
Name:productdir
Data: Vcvarsall.bat Path
Note: The path does not contain the last backslash.
2, Installation ECDSA
See a lot of blogs do not mention this library, but I do Paramiko, I am not prompted to find the ECDSA module.
Download: https://pypi.python.org/pypi/ecdsa/0.9 , unzip to a directory, and there is a setup.py in the directory.
Installation is relatively simple, Windows directly under the extracted directory after the execution: Python setup.py install
3. Installing Paramiko
With the ECDSA type installed, just open the download page very slow ...
Installation Steps with ECDSA
tutorial on installing Python's SSH module under Windows system