8 SSH
Martín Fernández edited this page 2 years ago

available on kobo, kindle, cervantes

In KOReader the SSH server settings are under Network in the tools menu (Cog icon).

The ssh server is dropbear. Openssh's sftp server is also installed. The authorized_keys file is at settings/SSH/authorized_keys. Username is root. Login without password lets you log in with any password (it's not to do with keys).

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.

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 fails with error message scp: not found and lost connection

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.