Skip to content

Instantly share code, notes, and snippets.

@estysdesu
Last active December 9, 2023 20:39
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estysdesu/c90478aac75b732820be6720254aeda7 to your computer and use it in GitHub Desktop.
Save estysdesu/c90478aac75b732820be6720254aeda7 to your computer and use it in GitHub Desktop.
[Kindle 4: Jailbreak and SSH] #kindle #ssh #jailbreak

Following this guide: https://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH.
Using Kindle 4.1 and macOS 10.14.

  1. Connect the Kindle. It should be recognized as a USB Mass Storage Device.
  2. Download the jailbreak archive
  3. Copy data.tar.gz, ENABLE_DIAGS, and diagnostic_logs to the Kindle folder.
  4. Restart the Kindle into Diagnostics Mode.
  5. Reboot the Kindle from the Diagnostics Mode. Reboot screen should show jailbroken screensaver.
  1. Download the USBNetwork archive needed to enable SSH over network access.
  2. Edit the usbnet/etc/config file if needed. I changed:
    1. K3_WIFI="true"
    2. USE_OPENSSH="true"
    3. (Optional) K3_WIFI_SSHD_ONLY="true" (only after first time connecting via SSH and setting up auto-enabled USBNetwork)
  3. (Optional) rename usbnet/DISABLED_auto to usbnet/auto to enable USBNetwork Utility start on device startup.
  4. Enable the USBNetwork Utility from the Kindle (enable the keyboard if needed); type:
    1. ;debugOn
    2. ~usbNetwork
    3. ;debugOff
  5. Connect the Kindle again.
  6. Manually configure the device IPv4:
    • IP Address: 192.168.15.201
    • Subnet: 255.255.255.0
  7. Obtain the Kindle root user password:
  8. SSH into the Kindle: ssh root@192.168.15.244 and enter password from previous step
@banagale
Copy link

banagale commented Jun 5, 2021

@estydesu How are you able to turn off airplane mode and not have the device update to 5.13.15? I made a mistake thinking that the hotfix in the main guide did this, and during testing of the USBnetwork binary had the device update to 5.13.5. :(

@estysdesu
Copy link
Author

@banagale Can you elaborate your issue? I haven't done anything new to my Kindle in a while, but still actively use it and connect it to WiFi.

@equinix5
Copy link

equinix5 commented Feb 1, 2022

Tyler, Thanks for your tutorial. =)

When I try to SSH into my kindle PW2 (5.12.2.1.1) and it asks for the password it keeps saying "Permission denied, please try again"

I have followed your steps
SSH

  1. Downloaded and installed kindle-usbnet-0.22.N-r18833

  2. edits in usbnet/etc/config
    USE_WIFI="true"
    USE_WIFI_SSHD_ONLY="false"
    USE_OPENSSH="true"
    QUIET_DROPBEAR="false"
    TWEAK_MAC_ADDRESS="true"

  3. I've changed the file once to see if it worked after that I used the Enable SSH at boot option and did a reboot.

  4. (See 3. , still would like to know where you would write these commands ?)

  5. Done

  6. Done on Linux Mint, it says its connected

  7. This website gives me 4 passwords mario fiona3a0 fionaf97 fionaf974 (The first time I requested the passwords I didn't capitalize the Letters in my serial number, I did so after which gave me these passwords)

  8. When I type ssh root@192.168.15.244 it will ask me for the root password but none of the provided passwords from 7. seem to be working (I get this message Permission denied, please try again.)

Any idea what I'm doing wrong ?

@Inc0n
Copy link

Inc0n commented Feb 1, 2022

https://phoenixnap.com/kb/ssh-permission-denied-publickey
It might have something to do with the permission of your authorized_keys

@cyrillkuettel
Copy link

USB device name

Just a heads up for anyone in the future: Sometimes, especially on newer systems, the device name is a weird name like enxee4900000000 (instead of usb0). I think this is because of PredictableNetworkInterfaceNames.

Configure Network interface in Ubuntu

For anyone wondering what "Manually configure the device IPv4" exacly means, here the instructions for Ubuntu. (Tested on Ubuntu 22.04)

  • Open your network settings
  • Open "USB Ethernet" settings
  • In the "IPv4" tab:
  • Set "IPv4 Method" to "Manual"
  • Under "Addresses", set "Address" to 192.168.15.201 and "Netmask" to 255.255.255.0
  • Click "Apply"
  • Restart the connection by disabling it and re-enabling it
ssh root@192.168.15.244

This assumes the public keys are stored, in OpenSSH format, in usbnet/etc/authorized_keys.

@zenminimalist
Copy link

zenminimalist commented Nov 17, 2022

@cyrillkuettel @Inc0n @equinix5 Yeah, nothing is working for me. I have tried the 4 passwords from the password generator site. It still keeps me asking for a password when trying to ssh into my Kindle PW Sig. Edition.

Any idea what other things to try?

@cyrillkuettel
Copy link

The password tool did not work for me. I had to put my public key in usbnet/etc/authorized_keys, as far as I remember.

Do you have a new(ish) device? They tend to be quit tricky for this stuff. I can highly recommend mobileread threads like this one, they have extensive writeups of information. I can also recommend posting a question there in the Kindle Developer's Corner . These people can help you, they know everything about this sort of stuff.

@zenminimalist
Copy link

@cyrillkuettel Thanks for the quick reply!

Yeah it's Amazon's newest Kindle. I actually had that exact tab from Mobileread open, but couldn't get it to work. I also didn't see authorized_keys folder or files named that on my Kindle.

I'm actually trying to find a solution how to upload files from KOReader to Dropbox (download obviously no problem). One user seems to have developed a quick & dirty solution here on Github.

So since I have no idea how to get his solution up & running I thought I'd try the whole syncthing, which requires USBNetwork hack, SSH and so forth.

@bilabar
Copy link

bilabar commented Dec 16, 2022

Once you can log in as root via shared keys, you can set password using command passwd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment