Python - Paramiko - incompatible ssh server

I have an error on a script that I wrote from a few months ago, it worked very well with raspberry pi, but now with orange pi I have this:

>>> import paramiko
>>> transport = paramiko.Transport("192.168.2.2", 22)
>>> transport.connect(username = "orangepi", password = "my_pass")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 978, in connect
    self.start_client()
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 406, in start_client
    raise e
paramiko.ssh_exception.SSHException: Incompatible ssh server (no acceptable macs)

I can connect to the console using ssh without any problems.

Does anyone have an idea?

+4
source share
3 answers

You should check if any of these MAC algorithms is available on your SSH server (sshd_config, key: MAC):

  • HMAC-SHA1
  • HMAC-MD5
  • HMAC-SHA1-96
  • HMAC-MD5-96.

They are needed so that Paramiko can connect to your SSH server.

+6
source

/etc/ssh/sshd_config MACs , hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96 ( ), :

MACs hmac-sha1

sshd: sudo systemctl restart ssh.

+6

If the above solutions do not work, you need to update Paramiko, as explained in this.

0
source

All Articles