Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2024, 06:23 PM   #1
hondabf
Paranoid Monster
hondabf began at the beginning.
 
hondabf's Avatar
 
Posts: 14
Karma: 10
Join Date: Jan 2024
Device: Kindle PW4
Question How to add public keys to KOReader authorized_keys? (Kindle)

Following this guide I have enabled KOReader's SSH on my jailbreaked Kindle, but can't access to it from Filezilla because I don't know how to add a public key to the KOReader's authorized_keys file.

Without keys, Filezilla returns an "Access denied. Authentication failed" message (yes, I used "root" as user, and nothing for password), so I know it's connectable.

I have generated a pair of SSH keys through Putty. On Filezilla, I know I have to add the private key to the "SFTP Public Key Authentication" list, but how do I add the public key to KOReader's "dropbear_ecdsa_host_key"??

The first three lines are all gibberish. I am on Windows so I can't simply ">>cat". I have to add it manually, but it doesn't matter how many times I add the public key string, it makes the SSH unable to start.

Maybe I am messing up the file format and the plugin doesn't know what to do?

These are the several ways I tried adding the key string to the authorized_keys file:

1. below
Code:
gibberish characters
gibberish characters
gibberish characters

ecdsa-sha2-nistp256
keynumbershere

2. above

Code:
ecdsa-sha2-nistp256
keynumbershere

gibberish characters
gibberish characters
gibberish characters

3. delete gibberish characters

Code:
ecdsa-sha2-nistp256
keynumbershere

I KNOW usbnet exists, but since I don't have a Linux machine to do all the SSH magic, I fear I am going to brick my Kindle's in case I tried to do it on my Windows machine.

Thanks

Last edited by hondabf; 02-09-2024 at 01:19 AM. Reason: filezilla uppercases and code formatting
hondabf is offline   Reply With Quote
Old 01-20-2024, 07:05 PM   #2
hondabf
Paranoid Monster
hondabf began at the beginning.
 
hondabf's Avatar
 
Posts: 14
Karma: 10
Join Date: Jan 2024
Device: Kindle PW4
UPDATE: Login without password WORKS, just found out about that option. But I still wanted to have a safe way to SSH into my Kindle.

I also tried following dropbear's key format from their github (which is no split lines, someone@someone at the end) just below the gibberish characters like this:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEo Jd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= root@myIPhere

I tried adding my key there but still couldn't get SSH to work, I would suspect it's the "root@myIPhere" part because I didn't added the 2222 port, but at this point I think it's the gibberish characters. Because later on I deleted the added line leaving the file basically as if it was generated by KOReader and I still couldn't get SSH to work.
hondabf is offline   Reply With Quote
Advert
Old 01-20-2024, 07:16 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by hondabf View Post
I have generated a pair of SSH keys through Putty.
That's probably your issue right there. You need things to be in OpenSSH format.

Last I knew, PuTTy generate its own special flavor of keys, there's an extra step involved to convert to OpenSSH format.

Also, that plugin in unmaintained, so the dropbear build is super old, and doesn't support many modern & recommended key formats (e.g., any and all elliptic curves).

Last edited by NiLuJe; 01-20-2024 at 07:19 PM.
NiLuJe is offline   Reply With Quote
Old 01-20-2024, 07:19 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Case in point:

Quote:
Originally Posted by hondabf View Post
ecdsa-sha2-nistp256
The "EC" in ecdsa stands for "elliptic curve", ergo, it's not supported .
NiLuJe is offline   Reply With Quote
Old 01-20-2024, 07:20 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
On a Kindle, use the USBNet hack instead, it'll ship with a (slightly) more up-to-date dropbear version, that does support this.
NiLuJe is offline   Reply With Quote
Advert
Old 01-20-2024, 07:26 PM   #6
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
The SSH plugin at KOReader is dying and shouldn't be used unless you have no other option.

But most of the platforms have better, maintained, ssh daemons, including Kindle (see NiLuJe's stuff or hacks).

edit: wow, NiLuJe's speedrun . Ignore my comment

Last edited by pazos; 01-20-2024 at 07:29 PM.
pazos is offline   Reply With Quote
Old 01-20-2024, 07:27 PM   #7
hondabf
Paranoid Monster
hondabf began at the beginning.
 
hondabf's Avatar
 
Posts: 14
Karma: 10
Join Date: Jan 2024
Device: Kindle PW4
EDIT: Better explanation/reply below this post.

Last edited by hondabf; 02-09-2024 at 01:20 AM.
hondabf is offline   Reply With Quote
Old 01-20-2024, 07:39 PM   #8
hondabf
Paranoid Monster
hondabf began at the beginning.
 
hondabf's Avatar
 
Posts: 14
Karma: 10
Join Date: Jan 2024
Device: Kindle PW4
Okay, so apparently I had to create a new "authorized_keys" file inside the SSH folder, and paste my private key there (without the someone@someone thing at the end I mentioned earlier, just the Putty key) like this:

Code:
ssh-rsa <your key here without line breaks>
and leave the "dropbear_ecdsa_host_key" file alone.

Now it works!

I added the private key to the Filezilla list and now I am in without the need of the "without password" option.

Quote:
Originally Posted by NiLuJe View Post
That's probably your issue right there. You need things to be in OpenSSH format.

Last I knew, PuTTy generate its own special flavor of keys, there's an extra step involved to convert to OpenSSH format.

Also, that plugin in unmaintained, so the dropbear build is super old, and doesn't support many modern & recommended key formats (e.g., any and all elliptic curves).
Well, I don't know, the SSH could connect with Putty keys (I used ECSDA because the dropbear key file had mentions to it, haha) I will be moving to OpenSSH anyways.

But also yes, I will try to set up USBNet too in the following days, didn't know this plugin was dying

Last edited by hondabf; 04-22-2024 at 10:24 PM. Reason: add the line that it works now
hondabf is offline   Reply With Quote
Old 01-22-2024, 03:45 PM   #9
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Quote:
Originally Posted by hondabf View Post
But also yes, I will try to set up USBNet too in the following days, didn't know this plugin was dying
Or save yourself a lot of trouble and use telnet to troubleshoot your ssh problems

busybox telnetd -b 0:0:0:0:23
bitfreak is offline   Reply With Quote
Reply

Tags
filezilla, keys, kindle, koreader, ssh


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How add parent folder? (KOReader + Calibre) omin KOReader 9 10-19-2023 01:36 PM
Kindle 3's a and s keys not working offgrey Amazon Kindle 8 12-21-2011 04:45 AM
Free Book (Kindle) - Putting the Public Back in Public Relations koland Deals and Resources (No Self-Promotion or Affiliate Links) 0 12-27-2010 09:28 AM
Buy an ebook at HB prices but add a license for your public library? brecklundin News 8 02-14-2010 08:08 AM


All times are GMT -4. The time now is 07:55 AM.


MobileRead.com is a privately owned, operated and funded community.