SSH - koreader/koreader GitHub Wiki
This feature is only available on Cervantes, Kobo, Kindle, and PocketBook
The SSH server is dropbear. OpenSSH's SFTP server is also installed.
In KOReader, the SSH server settings are located under Tools menu (Cog icon) -> Network -> SSH server.
This menu contains the following items:
- The
SSH server
checkbox allows you to start the SSH server. After starting, a message will pop up with relevant information about the server, such as its IP address. - The
SSH port
menu item allows you to specify the SSH port. - SSH public keys must be placed under the folder detailed by the
SSH public key
menu item. - The
Login without password (DANGEROUS)
menu item lets you log in with any password.
Connecting through SFTP - without password
You can connect to device when it is online (in your home WiFi network) with SFTP if you setup your SSH to allow root logins without password. NB On PocketBook the username is typically reader
.
First setup SSH to allow connecting without password in SSH menu (which is WiFi menu):
After that setup any standard SFTP client to connect using the device's specific IP address (this is shown when starting the SSH server and also available under network info), and using port 2222
(standard SFTP port is 22). Like shown on image below (leave password field empty):
After that you can transfer your files to and from your device with SFTP client.
Troubleshooting
ssh fails with error message `packet_write_wait: Connection to ... port 2222: Broken pipe
Try disabling TTY with option -T and disabling X11 forwarding with -x:
ssh -T -x -v -p 2222 user@ip
scp: not found
and lost connection
scp fails with error message The scp command is not installed / not supported on your device.
Workaround 1
You can use the following workaround to transfer a file with ssh:
cat src_file | ssh -T -x -p 2222 user@ip 'cat > dst_file'
The parent directory of dst_file
must exist.
Workaround 2
For more comfort, you can use lsyncd to send modified files automatically to the target. You can find an example configuration file for this purpose at lsyncd-workaround.
ssh doesn't recognize a public key
Ensure your ssh key is inside a file called authorized_keys
, not a directory, and that multiple ssh keys are separated by newlines.
Ensure your ssh key algorithm is ecdsa
or otherwise configured (see #8370)