Methods of access

From reMarkable Wiki
Jump to: navigation, search

USB network[edit]

reMarkable have set the device up to present as a USB ethernet device when plugged into a PC/Mac etc. The reMarkable runs a DHCP server and will listen on 10.11.99.1 by default and provide out the IP address 10.11.99.2 (not sure it will provide any more than a single client IP).

USB beta web UI[edit]

reMarkable have provided a beta web UI that needs to be turned on to access.

Enabling the service[edit]

The service can be turned on from the settings page:

  • rM icon at the top left of the home page on the device
    • Storage
      • Enable USB web interface (Beta) - toggle the switch on the right (the IP address is obscured by the text).

Accessing files via a web browser[edit]

If you don't want to use the app for syncing files to your reMarkable, you can upload and download files via the beta USB web UI.

  • Open the page http://10.11.99.1/ in your browser.
  • To upload, drag a file from your file explorer into the center section of the page and it will upload (it isn't quick and there is not much feedback as to progress).
    • The upload function doesn't seem to pay any attention to what folder you have browsed to in the UI and will always upload to the top "My Files" section on the reMarkable
    • The icon on the top right is a download icon, not an upload icon as described incorrectly in their recent tips & tricks document. I have not found an upload icon.
  • To download a file:
    • browse the folders to find it
    • select it (it goes white on black)
    • click the download icon in the top right.

Accessing files via curl[edit]

If you have curl available (or wget or similar), you can upload and download files via the command line.

  • To upload:
chronos@localhost ~/Downloads $ curl 'http://10.11.99.1/upload' -H 'Origin: http://10.11.99.1' -H 'Accept: */*' -H 'Referer: http://10.11.99.1/' -H 'Connection: keep-alive' -F "file=@Get_started_with_reMarkable.pdf;filename=Get_started_with_reMarkable.pdf;type=application/pdf" 
Upload successfullchronos@localhost ~/Downloads $
  • To download is a little more complex as you need to find the internal UUID (long hyphenated string of letters and numbers) that the reMarkable internally uses to refer to the file you want. You can see this UUID when you browse the Web UI if you select a file and then hover over the download icon and look at the URL it links to (something like http://10.11.99.1/download/0c50f392-8a96-43ef-b58b-df4f049fb703/placeholder). The other way to get the UUIDs is to look in the filesystem on the device if you have access.
  • Once you have the UUID, you can get the filename associated using:
chronos@localhost ~/Downloads $ curl -I http://10.11.99.1/download/fd2c4b2c-3849-46c3-bf2d-9c80994cc985/placeholder
HTTP/1.1 200 OK
Content-Disposition: attachment; filename='Get_started_with_reMarkable.pdf'
Content-Length: 4444023
Content-Type: application/pdf
Transfer-Encoding: chunked 
    • Unfortunately, the built in webservice is not smart, and so getting the HEAD data like this takes just as long as getting the whole file. I believe this is because it has to allow for those files where it has to render the lines into the file to get the final file size (Content-Length).
  • You can download the file using:
chronos@localhost ~/Downloads $ curl -o 'Get_started_with_reMarkable.pdf' http://10.11.99.1/download/fd2c4b2c-3849-46c3-bf2d-9c80994cc985/pdf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4339k  100 4339k    0     0  57914      0  0:01:16  0:01:16 --:--:--  924k

SSH[edit]

reMarkable have kindly enabled ssh access to the device by default. There are no user accounts so you need to use the root account to log into the device. As this is the Linux superuser account, please be aware that you can break things easily with this account if you aren't careful.

Connecting via ssh[edit]

The password for the root account is randomly created by the software on the device when it starts and is visible at the bottom of the Compliance statements in the About section of the reMarkable settings:

  • rM icon at the top left of the home page on the device
    • About
      • Compliance statements
        • GPLv3 Compliance, look for the text that says "To do so, this device acts as an USB ethernet device, and you can connect using the SSH protocol using the username 'root' and the password 'XXXXX'. The IP address available to connect to are listed below: 10.11.99.1"

You will need an ssh client for your machine, for example [putty] on a PC, terminal on a Mac or Linux box, chronos shell from a Chromebook (in developer mode).

Example from a Chromebook shell (in developer mode):

chronos@localhost ~ $ ssh root@10.11.99.1
root@10.11.99.1's password: 
reMarkable
╺━┓┏━╸┏━┓┏━┓   ┏━╸┏━┓┏━┓╻ ╻╻╺┳╸┏━┓┏━┓
┏━┛┣╸ ┣┳┛┃ ┃   ┃╺┓┣┳┛┣━┫┃┏┛┃ ┃ ┣━┫┗━┓
┗━╸┗━╸╹┗╸┗━┛   ┗━┛╹┗╸╹ ╹┗┛ ╹ ╹ ╹ ╹┗━┛
remarkable: ~/ 

Host alias in .ssh/config[edit]

You can set up an alias that's easier to remember by adding the following lines to the .ssh/config file on your computer:

host remarkable
        Hostname 10.11.99.1
        User root

Setting up ssh-keys[edit]

The reMarkable uses dropbear (via busybox) for its ssh server and supports ssh keys (definitely rsa, as there have been some issues with ed25519 SHA256 keys). By doing so, you can save yourself from entering the random password in the future.

On your host machine, generate a ssh-key if you haven't done so already

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/chronos/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/chronos/user/.ssh/id_rsa.
Your public key has been saved in /home/chronos/user/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:kONWRVsc4pHeO/ObKieTqJO2A6ZdqY5Zv2v+70SaVD0 chronos@localhost
The key's randomart image is:
+---[RSA 2048]----+
|         .=oo.   |
|       . o.*.    |
|      + ..+.E    |
|     . + .. ..   |
|      o.S .  .   |
|    o.o. +  +    |
|   +.+ .o... +   |
|  .+o.* ..= . .. |
|  o..+BO.oo=..o. |
+----[SHA256]-----+

Authorizing with ssh-copy-id[edit]

To authorize your host machine on the reMarkable using ssh-copy-id

$ ssh-copy-id root@10.11.99.1
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/chronos/user/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@10.11.99.1's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'root@10.11.99.1'"
and check to make sure that only the key(s) you wanted were added.

The reMarkable should be accessible to the host machine without providing a password.

Authorizing without ssh-copy-id[edit]

To copy and authorize your ssh keys without ssh-copy, begin by creating a .ssh directory on your reMarkable

remarkable: ~/ mkdir /home/root/.ssh

On your host machine, proceed by appending your host key to the devices authentication list

$ cat ~/.ssh/id_rsa.pub | ssh root@10.11.99.1 “cat » .ssh/authorized_keys”

On your reMarkable, set the access rights of the .ssh directory to read-only

remarkable: ~/ chmod -R og-rwx /home/root/.ssh

The reMarkable should be accessible to the host machine without providing a password.