Paramiko “Unknown Server”

前端 未结 5 2117
余生分开走
余生分开走 2020-11-22 15:13

I\'m trying to get started with the Paramiko library, but the library is throwing an exception as soon as I try to connect with the following simple program:



        
5条回答
  •  感情败类
    2020-11-22 16:13

    I encountered this issue and wanted to post a workaround here. The issue was indeed the ssh server sending ecdsa keys, which are not supported (yet) with paramiko. On my debian Wheezy system I disabled ecdsa by commenting out a single line in /etc/ssh/sshd_config:

    # HostKey /etc/ssh/ssh_host_ecdsa_key

    Restarted sshd, and it was back to using RSA. There were some ecdsa keys in my known_hosts file so I just deleted it to reset, and logged in manually to recreate the keys. From there, paramiko worked perfectly as expected, with RSA host key checking.

提交回复
热议问题