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