View Single Post
Old 05-07-2023, 05:35 PM   #5
elinkser
Addict
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 242
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
OK that went better.

Running telnet session to Kobo:

# cd /mnt/onboard/.adds/koreader/scripts/

Run "vi mydropbear.sh" to create wrapper script:

#!/bin/sh
export PATH=$PATH:/mnt/onboard/.adds/koreader/scripts
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/onboard/.adds/koreader/libs
export HOME=/mnt/onboard/.adds/koreader/
cd $HOME
dropbear -E -R -p2222 -P /tmp/dropbear_koreader.pid


* Edit: The PATH's should have custom part at start - see following posts.
However dropbear only needs HOME - see:

https://www.mobileread.com/forums/sh...d.php?t=353810


Re-edit above NickelMenu entry with "vi /mnt/onboard/.adds/nm/config.txt"

menu_item :main : Dropbear (toggle) :cmd_output :500:quiet :/usr/bin/pkill -f "dropbear"
chain_success:skip:5
chain_failure :cmd_spawn :quiet :/bin/mount -t devpts | /bin/grep -q /dev/pts || { /bin/mkdir -p /dev/pts && /bin/mount -t devpts devpts /dev/pts; }
chain_success :cmd_spawn :quiet :sh /mnt/onboard/.adds/koreader/scripts/mydropbear.sh
chain_success :dbg_toast :Started Dropbear server on port 2222
chain_failure :dbg_toast :Error starting Dropbear server on port 2222
chain_always:skip:-1
chain_success :dbg_toast :Stopped Dropbox server on port 2222


Run NickelMenu and select "Dropbear (toggle)"


# ps ax | grep dropbear
1543 root 0:00 dropbear -E -R -p2222 -P /tmp/dropbear_koreader.pid
1554 root 0:00 grep dropbear


On a second terminal on the PC run:

$ ssh root@192.168.2.2 -p 2222
root@192.168.2.2's password:
[root@kobo ~]#
(And we're in!)
[root@kobo ~]# exit
Connection to 192.168.2.2 closed.
$

Run NickelMenu and select "Dropbear (toggle)"


# ps ax | grep dropbear
1558 root 0:00 grep dropbear

Last edited by elinkser; 05-09-2023 at 06:42 PM.
elinkser is offline   Reply With Quote