Python paramiko module error Solution

Source: Internet
Author: User

Python paramiko module error Solution
A Python script is written as follows: #-*-coding: UTF-8-*-_ author _ = 'Kai' import paramikoimport sys, OS host = sys. argv [1] user = 'zk' password = '000000' cmd = sys. argv [2] s = paramiko. SSHClient () # bind instance s. load_system_host_keys () # load the HOST file s. set_missing_host_key_policy (paramiko. autoAddPolicy () s. connect (host, 22, user, password, timeout = 5) # connect to the remote host stdin, stdout, stderr = s.exe c_command (cmd) # execute the command pai_result = stdout. read (), stderr. read () # read command results for line in rows _result: print line, s. close () is mainly used for exercises. An error is reported after execution: # python paramkio. py localhost dfNo handlers cocould be found for logger "paramiko. transport "Traceback (most recent call last): File" paramkio. py ", line 16, in <module> s. connect (host, 22, user, password, timeout = 5) # connect to the remote host File "build/bdist. linux-x86_64/egg/paramiko/client. py ", line 296, in connect File" build/bdist. linux-x86_64/egg/paramiko/transport. py ", line 458, in start_clientparamiko.SSHException: Incompatible ssh peer (no acceptable kex algorithm) is generated because the installed paramiko module version is too low to view the current paramiko version: pip freezelxml = 3.4.2MySQL-python = export-httpsclient = 0.3.2oauthlib = 0.6.1oneconf = 0.3.7PAM = versions = 1.7.6Pillow = 2.7.0piston-mini-client = Taobao -modules = 0.0.5pycrypto = 2.6.1pycups = 1.9.72 and then directly upgrade the module version: pip install paramiko -- upgrade paramiko = 1.15.2

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.