paramiko Incompatible ssh peer (no acceptable kex algorithm)

后端 未结 7 1565
醉梦人生
醉梦人生 2020-12-29 04:10

I\'m getting the following error when trying to ssh to a Cisco ACS device using the paramiko library. I\'ve used paramiko in python without issue, and I can ssh to this box

7条回答
  •  轮回少年
    2020-12-29 04:52

    This may not help the OP's situation, but hopefully it may help someone else with the same error.

    I ran into a situation where one script would SSH into a system just fine, but another similar script would fail with the same

    paramiko.SSHException: Incompatible ssh peer (no acceptable kex algorithm)
    

    error.

    The situation turned out to be the shebang line at the top of my script:

    #!/usr/bin/python
    

    Would fail, while

    #!/usr/bin/env python
    

    would succeed.

    I'm using virtualenvs on my system, so the failing /usr/bin/python version was using the older Paramiko version installed on the system, whereas the /usr/bin/env python version was using the newer Paramiko installation in my virtualenv.

提交回复
热议问题