Skip to content

Disable unsupported SHA-2 pubkey algorithms - #67

Merged
Evidlo merged 1 commit into
Evidlo:masterfrom
bsiegel:patch-1
Jan 20, 2022
Merged

Evidlo merged 1 commit into
Evidlo:masterfrom
bsiegel:patch-1

Conversation

@bsiegel

@bsiegel bsiegel commented Jan 20, 2022

Copy link
Copy Markdown
Contributor

As documented in paramiko/paramiko#1961 there is an incompatibility between Paramiko 2.9+ and dropbear (the SSH server used on Remarkable) when negotiating the pubkey algorithm. This fixes the issue by disabling SHA-2 algorithms, causing Paramiko to offer a SHA-1 algorithm which Dropbear will accept.

Without this change, the connection fails with a generic error when Paramiko 2.9+ is used:

Traceback (most recent call last):
  File "/usr/local/bin/remouse", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/remarkable_mouse/remarkable_mouse.py", line 131, in main
    rm_inputs = open_rm_inputs(
  File "/usr/local/lib/python3.10/site-packages/remarkable_mouse/remarkable_mouse.py", line 71, in open_rm_inputs
    client.connect(
  File "/usr/local/lib/python3.10/site-packages/paramiko/client.py", line 435, in connect
    self._auth(
  File "/usr/local/lib/python3.10/site-packages/paramiko/client.py", line 766, in _auth
    raise saved_exception
  File "/usr/local/lib/python3.10/site-packages/paramiko/client.py", line 666, in _auth
    self._transport.auth_publickey(username, pkey)
  File "/usr/local/lib/python3.10/site-packages/paramiko/transport.py", line 1634, in auth_publickey
    return self.auth_handler.wait_for_response(my_event)
  File "/usr/local/lib/python3.10/site-packages/paramiko/auth_handler.py", line 258, in wait_for_response
    raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.

As documented in paramiko/paramiko#1961 there is an incompatibility between Paramiko 2.9+ and dropbear (the SSH server used on Remarkable) when negotiating the pubkey algorithm. This fixes the issue by disabling SHA-2 algorithms, causing Paramiko to offer a SHA-1 algorithm which Dropbear will accept.
@Evidlo
Evidlo merged commit 6ed83f1 into Evidlo:master Jan 20, 2022
@bsiegel
bsiegel deleted the patch-1 branch January 20, 2022 22:38
fredrikudengen pushed a commit to fredrikudengen/remarkable_mouse that referenced this pull request Sep 8, 2026
As documented in paramiko/paramiko#1961 there is an incompatibility between Paramiko 2.9+ and dropbear (the SSH server used on Remarkable) when negotiating the pubkey algorithm. This fixes the issue by disabling SHA-2 algorithms, causing Paramiko to offer a SHA-1 algorithm which Dropbear will accept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants