[Solved] How to connect via SFTP to Remarkable 2 tablet

Short version

If rclone gives you an error message like

Failed to create file system for "remarkable:": NewFs: couldn't connect SSH: ssh: handshake failed: EOF

when attempting to connect to your Remarkable 2 tablet via SFTP, then adding

--sftp-host-key-algorithms ssh-ed25519

to your rclone commands might solve the problem.

Long version

When trying to use rclone to sync files with my Remarkable 2 tablet, I was getting the same problem as @Silver7845 in this post:

The error message was:
Failed to create file system for "remarkable:": NewFs: couldn't connect SSH: ssh: handshake failed: EOF

Armed with the knowledge from @Silver7845's post, I asked for help in the dropbear github project. (The Remarkable 2 uses the dropbear SSH server.)

Following advice from mkj there, I added --sftp-host-key-algorithms ssh-ed25519 to my rclone commands and that solved the problem. (This was a relief, because the alternative was to edit the dopbear service configuration on the tablet and I was not confident about that.)

Note that I can connect to dropbear using the SSH client on my MX Linux computer, so the SSH client and rclone are doing something different in the connection attempt. Here is the detail about the dropbear bug that the SSH client handles but rclone (by default) does not:

The problem is that Dropbear version has a bug where it'll offer RSA even if there's no key available, and then crash. (The bug's fixed in a newer version).

Presumably the SSH client on my Linux system tries host key types in a different order from rclone, or tries a different host key type after one or more handshake failures.

version, config and error just in case they are useful

I assume the following information is redundant but I'm including it just in case.

$ rclone --version
rclone v1.66.0
- os/version: debian 12.5 (64 bit)
- os/kernel: 6.1.0-20-amd64 (x86_64)
- os/type: linux
- os/arch: 386
- go/version: go1.22.1
- go/linking: static
- go/tags: none
[remarkable]
type = sftp
host = 192.168.1.103
user = root
key_file = /home/crantok/.ssh/id_rsa
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
$ rclone -vv lsd remarkable:
2024/05/26 15:19:53 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "-vv" "lsd" "remarkable:"]
2024/05/26 15:19:53 DEBUG : Creating backend with remote "remarkable:"
2024/05/26 15:19:53 DEBUG : Using config file from "/home/crantok/.config/rclone/rclone.conf"
2024/05/26 15:19:53 DEBUG : pacer: low level retry 1/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:53 DEBUG : pacer: Rate limited, increasing sleep to 200ms
2024/05/26 15:19:53 DEBUG : pacer: low level retry 2/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:53 DEBUG : pacer: Rate limited, increasing sleep to 400ms
2024/05/26 15:19:53 DEBUG : pacer: low level retry 3/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:53 DEBUG : pacer: Rate limited, increasing sleep to 800ms
2024/05/26 15:19:54 DEBUG : pacer: low level retry 4/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:54 DEBUG : pacer: Rate limited, increasing sleep to 1.6s
2024/05/26 15:19:54 DEBUG : pacer: low level retry 5/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:54 DEBUG : pacer: Rate limited, increasing sleep to 2s
2024/05/26 15:19:56 DEBUG : pacer: low level retry 6/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:19:58 DEBUG : pacer: low level retry 7/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:20:00 DEBUG : pacer: low level retry 8/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:20:02 DEBUG : pacer: low level retry 9/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:20:04 DEBUG : pacer: low level retry 10/10 (error couldn't connect SSH: ssh: handshake failed: EOF)
2024/05/26 15:20:04 Failed to create file system for "remarkable:": NewFs: couldn't connect SSH: ssh: handshake failed: EOF

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.