Installation and modification of the Python ssh-client module Paramiko under Windows

Source: Internet
Author: User

Installation article:

1. Download and install the Easy_install,

Use command: C:\python27>python.exe ez_setup.py

Download rul:http://peak.telecommunity.com/dist/ez_setup.py

2. Download Pycryto, download and install according to the actual version, I use window 7 64bit,python 2.7.2 64bit

Download Url:http://www.voidspace.org.uk/python/modules.shtml#pycrypto

3. Installing Paramiko

Use command: C:\python27\scripts>easy_install.exe Paramiko

4. Test, open Python IDLE, enter import Paramiko see if the error (Error-free means installation success), and enter paramiko.__file__ to view and record the corresponding egg file location

SOURCE Improvement article:

Problem Description: Using the function paramiko.util.log_to_file (' D:\\paramiko.log '), can realize the SSH login and operation process of log recording function, However, each time the script is run to call the function Paramiko.log file will be overwritten, which will result in the loss of the contents of the log file, see the source code:

SOURCE Url:http://www.lag.net/paramiko/docs/paramiko.util-pysrc.html#log_to_file

Solve the idea, the source file in the F=open (filename, ' W ') Replace f=open (filename, ' a ') can

Resolution process:

1. Open C:\Python27\lib\site-packages\paramiko-1.9.0-py2.7.egg with WinRAR (note backup)

2. Delete Paramiko-1.9.0-py2.7.egg\paramiko\util.pyc,

3. Open paramiko-1.9.0-py2.7.egg\paramiko\util.py, modify the following

4. Save the modified Paramiko-1.9.0-py2.7.egg with WinRAR

5. Overwrite replace file with same name C:\Python27\lib\site-packages\paramiko-1.9.0-py2.7.egg

6. Testing

Resources

Http://stackoverflow.com/questions/2964658/installing-paramiko-on-windows

Installation and modification of the Python ssh-client module Paramiko under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.