Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2013, 05:02 PM   #1
Oddbloke
Junior Member
Oddbloke began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2013
Device: K4 Wifi, no keyboard
telnetd on a K4

Hi guys!

I've successfully jailbroken my K4 (wifi, not touch, no keyboard) and installed the usbNetwork, and configured it so that I can SSH to it over Wifi. So a BIG thanks to everyone's hard work in making this possible - the hack itself and all the notes people have written have been oustanding!

My intention is to use a number of jailbroken Kindles as displays around the house, to show mine and my wife's calendars, logs of missed phonecalls, and so on. I have a Linuxbox in the centre of it all doing the hard work, and I just need to get it sending commands to the Kindles.

I'd like to control the Kindles by telnet rather than ssh - I know it's not particularly secure, but it makes it much easier to write code for my Linuxbox server if I'm just sending Kindles commands via telnet. It's only my home network, so I'm not too concerned about security.

I've been unable to locate telnetd on my K4, and I've read rumours that some people have compiled statically-linked telnetd binaries to run on their Kindles instead. Is there anyone here who has done this? If so ... where did you get the binary from?

Thanks again, chaps!
Oddbloke is offline   Reply With Quote
Old 07-25-2013, 05:14 PM   #2
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: 10,781
Karma: 18600108
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O & Forma
@Oddbloke: It's bundled (and launched) with the USBNetwork hack .

You'll just have to patch the script a tiny bit so that it punches a hole in the firewall for telnet when WiFi is enabled (cf. usbnet/bin/usbnetwork @L255).

Keep in mind that the telnet daemon bundled with USBNetwork is patched to bypass any and all password/user checks, and drops you straight into a root shell. That may not be terribly desirable over WiFi.

Last edited by NiLuJe; 07-25-2013 at 05:19 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 07-25-2013, 05:43 PM   #3
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210797
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Oddbloke View Post
I'd like to control the Kindles by telnet rather than ssh - I know it's not particularly secure, but it makes it much easier to write code for my Linuxbox server if I'm just sending Kindles commands via telnet. It's only my home network, so I'm not too concerned about security.
You can use the ssh daemon as a replacement for rsh.
Which allows you to run shell commands / scripts on the remote machine.

Examples given in my series of ssh HowTo threads:
https://www.mobileread.com/forums/sho...d.php?t=204942

Which was written to introduce the concept of local scripting of remote actions.
knc1 is offline   Reply With Quote
Old 07-27-2013, 06:12 AM   #4
Oddbloke
Junior Member
Oddbloke began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2013
Device: K4 Wifi, no keyboard
Quote:
Originally Posted by NiLuJe View Post
@Oddbloke: It's bundled (and launched) with the USBNetwork hack .
Aye, I wondered that ... I had tried adding an extra rule for it in iptables, but without luck.

Quote:
Originally Posted by NiLuJe View Post
You'll just have to patch the script a tiny bit so that it punches a hole in the firewall for telnet when WiFi is enabled (cf. usbnet/bin/usbnetwork @L255).
I'm looking at that line now ... it seems to be talking about going back to USB MS. Is that the portion of script you mean, or do you have a slightly different version? Do you mean the iptables line under the comment "Allow SSH via Wifi"? I'm thinking I should add an extra entry for telnet too?

Quote:
Originally Posted by NiLuJe View Post
Keep in mind that the telnet daemon bundled with USBNetwork is patched to bypass any and all password/user checks, and drops you straight into a root shell. That may not be terribly desirable over WiFi.
That sounds ideal for me. I know it sounds lazy (particularly as I used to be a Linux Sysadmin) but I'm not all that concerned about secure access to a Kindle on my own home LAN.
Oddbloke is offline   Reply With Quote
Old 07-27-2013, 08:35 AM   #5
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210797
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
I made the changing of iptable rules very easy in the KUAL firewall.

You will probably recognize the structure if ever a Linux sysadmin.

**ALSO**
You do not have to modify files in the Amazon system image.
knc1 is offline   Reply With Quote
Advert
Old 07-27-2013, 12:43 PM   #6
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: 10,781
Karma: 18600108
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O & Forma
@Oddbloke: Oops. Was looking at my SVN WC, so, yeah, got the wrong L° ;D.

Yeah, I indeed meant the iptables line .

Something in the vein of
Code:
iptables -A INPUT -i wlan0 -p tcp --dport telnet -j ACCEPT
should do the trick. (+ UDP if needed, I'm not familiar with the inner workings of the telnet protocol and can't remember how much of UDP is blocked by the default rules.)

Last edited by NiLuJe; 07-27-2013 at 07:30 PM.
NiLuJe is offline   Reply With Quote
Old 07-27-2013, 04:13 PM   #7
Oddbloke
Junior Member
Oddbloke began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2013
Device: K4 Wifi, no keyboard
Quote:
Originally Posted by NiLuJe View Post
@Oddbloke: Oops. Was looking at my SVN WD, so, yeah, got the wrong L° ;D.

Yeah, I indeed meant the iptables line .

Something in the vein of
Code:
iptables -A INPUT -i wlan0 -p tcp --dport telnet -j ACCEPT
should do the trick. (+ UDP if needed, I'm not familiar with the inner workings of the telnet protocol and can't remember how much of UDP is blocked by the default rules.)
Did that exact line, but didn't work for me. telnet is TCP, so that line on its own should be fine as far as I know.

When I do a ps -x I notice that a sshd is running, but no telnet equivalent. What is the name of the executable that should be running that serves telnet?

Also ... where are TELNET_DAEMON and TELNET_DAEMON_OPTS defined? I can't find them.
Oddbloke is offline   Reply With Quote
Old 07-27-2013, 07:34 PM   #8
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: 10,781
Karma: 18600108
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O & Forma
@Oddbloke: /mnt/us/usbnet/bin/busybox telnetd

You should find the pid of the currently running instance in the /mnt/us/usbnet/run/telnetd.pid pidfile.

(The constants are defined in usbnet/bin/libkh)
NiLuJe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
telnetd für PB302 reader42 PocketBook 4 10-25-2010 07:19 AM
telnetd for PB302 reader42 PocketBook 0 10-25-2010 05:49 AM
sdk on osx? compile telnetd for PB? iPocketBook PocketBook 0 06-29-2010 07:11 AM
telnetd / gaining root jesse Kindle Developer's Corner 32 03-23-2009 07:04 AM


All times are GMT -4. The time now is 12:11 AM.


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