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

Go Back   MobileRead Forums > E-Book Readers > PocketBook

Notices

Reply
 
Thread Tools Search this Thread
Old 07-07-2018, 08:27 AM   #1
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
pbsshd doesn't start, openssh lib mismatch

Hello,

My PocketBook is PocketBook Inkpad 3
I installed on it this pbsshd version: pbsshd_1.3_fwv5
But pbsshd doesn't start at all.
Also -d option doesn't log anything
Thats why I started sshd_start.app from my pb konsole(I installed it ) and detected real problem:

Code:
OpenSSL version mismatch. Built against 1000107f, you have 100020df
How I can solve this issue ?
Thanks
cprog is offline   Reply With Quote
Old 07-07-2018, 02:42 PM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
It looks like openssl was upgraded on the device, which is good for security. However, it does mean old binaries won't work, and also it is likely that the pocketbook SDK is out of date. To get this to work properly will take a fair amount of work. You will need to download the most recent version of the SDK (I recommend getting @BruceLee's version at https://www.mobileread.com/forums/sh...34&postcount=1). If the version of libcrypto.so on the device doesn't match the version in the SDK, you will have to download the openssl source code that matches the version on the device, and then cross-compile it with the SDK. You will then need to update the SDK by hand with the cross-compiled libraries and include files. After that, you can get a recent version of the openssh source code, and then cross-compile that based on the instructions in the README.txt file in the pbsshd package. Looking inside the pbsshd package, you will be able to see which of the cross-compiled openssh files you will need to copy onto the device.

An easier, but less secure, option would be to copy the version of libcrypto.so.1.0.0 from the pocketboot SDK to a new directory on the device, and add it to the LD_LIBRARY_PATH environmental variable within the sshd_start.app script before sshd is started. For example, if you copy it to the /mnt/ext1/applications/pb_sshd directory, then you would add the line:

export LD_LIBRARY_PATH=/mnt/ext1/applications/pb_sshd:$LD_LIBRARY_PATH

I'm not 100% sure that the LD_LIBRARY_PATH variable will be passed to the programs started by sshd (e.g. sftp-server). It is easiest to just try and see.
rkomar is offline   Reply With Quote
Old 07-08-2018, 02:15 AM   #3
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
Thank you for your help.
My software version is: U740.5.17.1736

That's why I think that my device is FW5 device
From yourl URL (https://www.mobileread.com/forums/sh...34&postcount=1)
I reached here https://github.com/blchinezu/pocketbook-sdk

From instructions I understand, that right SDK for my device is SDK_481
But here https://github.com/blchinezu/pocketb...bi/sysroot/lib I don't find any libcrypto.so.1.0.0

Also here is the content of my device's lib dir:

Code:
/ $ ls /lib           
firmware
ld-2.9.so
ld-linux.so
ld-linux.so.3
libSegFault.so
libbluetooth.so
libbluetooth.so.3
libbluetooth.so.3.13
libbluetooth.so.3.13.0
libc-2.9.so
libc.so
libc.so.6
libcrypt-2.9.so
libcrypt.so
libcrypt.so.1
libdbus-1.so
libdbus-1.so.3
libdbus-1.so.3.8
libdbus-1.so.3.8.10
libdl-2.9.so
libdl.so
libdl.so.2
libgcc_s.so
libgcc_s.so.1
libglib-2.0.so
libglib-2.0.so.0
libglib-2.0.so.0.4200
libglib-2.0.so.0.4200.0
libical.so
libical.so.0
libical.so.0.48
libical.so.0.48.0
libicalss.so
libicalss.so.0
libicalss.so.0.48
libicalss.so.0.48.0
libicalvcal.so
libicalvcal.so.0
libicalvcal.so.0.48
libicalvcal.so.0.48.0
libiw.so
libiw.so.29
libm-2.9.so
libm.so
libm.so.6
libnsl-2.9.so
libnsl.so
libnsl.so.1
libnss_dns-2.9.so
libnss_dns.so
libnss_dns.so.2
libnss_files-2.9.so
libnss_files.so
libnss_files.so.2
libpthread-2.9.so
libpthread.so
libpthread.so.0
libresolv-2.9.so
libresolv.so
libresolv.so.2
librt-2.9.so
librt.so
librt.so.1
libutil-2.9.so
libutil.so
libutil.so.1
libz.so
libz.so.1
libz.so.1.2
libz.so.1.2.8
modules
Please, could you give me a exact link to this libcrypto.so.1.0.0 ?
I want to try to preload it.
cprog is offline   Reply With Quote
Old 07-08-2018, 02:24 AM   #4
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
Look in sysroot/usr/lib/. The header files will be in sysroot/usr/include/openssl/, as well, if you want to replace them later.
rkomar is offline   Reply With Quote
Old 07-08-2018, 06:36 AM   #5
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
Preloading fix error message but sshd still doesn't start in fact.
So I will try to compile it for my device
Could you tell me some good tutorial step by step how to setup environment and
compile for my device sshd ?
cprog is offline   Reply With Quote
Old 07-08-2018, 01:27 PM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
Is there an error message on the console from sshd? Does it get far enough to write output to pb_sshd/sshd.log? It would be good to know why it is failing. Maybe it doesn't need to be rebuilt.

Updating the SDK with a newer version of openssl, and then using that to rebuild openssh is a big job. I don't think I can lay out the steps in detail without doing it myself first. If you are new to cross-compiling packages from source code, then it's probably too difficult a job to start learning on. Do you have a lot of experience in this area?
rkomar is offline   Reply With Quote
Old 07-08-2018, 03:42 PM   #7
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
This is my sshd_start.app

Code:
#!/bin/sh
# Change this if the 'pb_sshd' directory has been installed elsewhere.
SSHDIR=/mnt/ext1/applications/pb_sshd

# If you want a pop-up message with the IP address and port for sshd
# displayed at startup, then uncomment the following line, and install
# sh_ivtool.app at that location.
#SH_IVTOOL=/mnt/ext1/system/bin/sh_ivtool.app

# The rest should not reduire editing.

# Connect to the net first if necessary.
ifconfig eth0 1> /dev/null 2> /dev/null
if [ $? -ne 0 ]; then
  touch /tmp/sshd-connected-to-wifi
  /ebrmain/bin/netagent connect
fi

export PATH="$SSHDIR"/usr/bin:"$SSHDIR"/usr/sbin:$PATH
export LD_LIBRARY_PATH=/mnt/ext1/applications/pb_sshd:$LD_LIBRARY_PATH

cd $SSHDIR

./server-keygen.sh

if [ -f create-keys ]; then
  ./make-keys.sh
  rm -f create-keys
fi

# To enable debugging output, replace "-d" with "-d" below.
"$SSHDIR"/usr/sbin/sshd \
  -f "$SSHDIR"/etc/ssh/sshd_config \
  -h "$SSHDIR"/etc/ssh/ssh_host_key \
  -h "$SSHDIR"/etc/ssh/ssh_host_dsa_key \
  -h "$SSHDIR"/etc/ssh/ssh_host_ecdsa_key \
  -h "$SSHDIR"/etc/ssh/ssh_host_rsa_key \
  -d -e 1> "$SSHDIR"/sshd.log 2> "$SSHDIR"/sshd.log

if [ -x "$SH_IVTOOL" ]; then
  IP=`ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1`
  PORT=`grep Port $SSHDIR/etc/ssh/sshd_config | cut -d ' ' -f 2`
  $SH_IVTOOL -s "sshd is listening at  ${IP}:${PORT}"
fi
At line line 42(-d option) I enable debug but sshd.log is empty.
At first run sshd_start.app creates keys and exits:

Code:
Generating public/private rsa1 key pair.
Your identification has been saved in etc/ssh/ssh_host_key.
Your public key has been saved in etc/ssh/ssh_host_key.pub.
The key fingerprint is:
12:cf:1f:69:ec:e1:c4:7e:85:c9:03:81:30:2c:2e:42 reader@pocketbook
The key's randomart image is:
+--[RSA1 2048]----+
|     .o. ..      |
| E  . ...  .     |
|.  . ..   .      |
|. . .  + o + o   |
| . .  . S O = .  |
|       . B o o   |
|          = .    |
|           .     |
|                 |
+-----------------+
Generating public/private dsa key pair.
Your identification has been saved in etc/ssh/ssh_host_dsa_key.
Your public key has been saved in etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
d6:42:fb:52:4c:f9:a0:4a:2f:87:ee:d5:a5:cd:e8:70 reader@pocketbook
The key's randomart image is:
+--[ DSA 1024]----+
|                 |
|           .     |
|        . +      |
|       . * o     |
|      . S + o    |
|     . = = *     |
|      + * E o    |
|     . + =       |
|     .o   .      |
+-----------------+
Generating public/private rsa key pair.
Your identification has been saved in etc/ssh/ssh_host_rsa_key.
Your public key has been saved in etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
1c:3b:90:d0:80:c5:43:78:56:63:67:15:dd:bc:9c:6d reader@pocketbook
The key's randomart image is:
+--[ RSA 2048]----+
|   *=++ o.oo o   |
|  o =o.=    . o  |
|   o .o .    . + |
|       o o    + E|
|        S      . |
|         .       |
|                 |
|                 |
|                 |
+-----------------+
Generating public/private ecdsa key pair.
Your identification has been saved in etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in etc/ssh/ssh_host_ecdsa_key.pub.
The key fingerprint is:
67:34:f0:fc:ab:b6:24:7d:98:43:ae:8c:2a:94:cf:32 reader@pocketbook
The key's randomart image is:
+--[ECDSA  256]---+
|        .        |
|         +       |
|          =      |
|         . o     |
|   .    S + .    |
|  o      * o .   |
| . o    . B o    |
|  E o  o +.+     |
|   +... o.o.     |
+-----------------+
Every next run print just nothing:

Code:
/mnt/ext1/applications $ sshd_start.app
/mnt/ext1/applications $
When I execute sshd_stop this is the result:

Code:
sshd_stop.app
killall: sshd: no process killed
Yes I'm new to cross-compiling packages from source code
I have some experience only in traditional compiling under linux ( for example ./configure; make; sudo make install)

I agree with you it's far better to find way to run without compiling
cprog is offline   Reply With Quote
Old 07-08-2018, 04:10 PM   #8
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
It's strange that sshd is failing without there being any error message. Perhaps you can try installing utelnetd on the device, and then running a telnet session from your desktop. You may pick up error messages that way that somehow don't appear in pbterm. You can get utelnetd from this thread: https://www.mobileread.com/forums/sho...d.php?t=183401

Run the following command on the device to see what version of openssl is installed:

strings /ebrmain/lib/libcrypto.so | grep OpenSSL

Somewhere in the output should be a line that looks something like this:

OpenSSL 1.0.1m 19 Mar 2015

Yours will have a different version number and date, I presume. If it comes to it, it may be easier for me to hack the SDK and build openssh for your device than try to explain all the steps to you.

Last edited by rkomar; 07-08-2018 at 04:19 PM. Reason: Added URL for utelnetd
rkomar is offline   Reply With Quote
Old 07-08-2018, 04:35 PM   #9
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
Code:
OpenSSL 1.0.2m  2 Nov 2017
I will try this telnetd server thanks

utelnetd is awesome ! Perfect shell !

Last edited by cprog; 07-08-2018 at 04:51 PM. Reason: Add feedback for utelnetd
cprog is offline   Reply With Quote
Old 07-08-2018, 04:57 PM   #10
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
Quote:
Originally Posted by cprog View Post
Code:
OpenSSL 1.0.2m  2 Nov 2017
I will try this telnetd server thanks

utelnetd is awesome ! Perfect shell !
I agree! I'm a vi user myself, and being able to edit with vi perfectly was a big plus for me.
rkomar is offline   Reply With Quote
Old 07-09-2018, 04:14 AM   #11
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
I forgot to add that the result is same from telnet session:

Code:
telnet inkpad 10000
Trying 192.168.6.130...
Connected to inkpad.
Escape character is '^]'.
bash-4.1$ cd /mnt/ext1/applications
bash-4.1$ ./sshd_start.app 
bash-4.1$ cat pb_sshd/sshd.log 
bash-4.1$ ./sshd_stop.app
killall: sshd: no process killed

Last edited by cprog; 07-09-2018 at 04:22 AM. Reason: Add code
cprog is offline   Reply With Quote
Old 07-09-2018, 12:29 PM   #12
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
About all I can suggest at this point is to try running sshd directly by cutting and pasting the lines from the script into the terminal. You will have to define SSHDIR and run netagent to connect to the network first, as well. I would omit redirecting the output, and let it appear in the terminal.
rkomar is offline   Reply With Quote
Old 07-09-2018, 01:19 PM   #13
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
No problem with utelnetd

Code:
bash-4.1$ SSHDIR=/mnt/ext1/applications/pb_sshd
bash-4.1$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 94:99:01:03:4B:17  
          inet addr:192.168.6.130  Bcast:192.168.6.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:678 errors:0 dropped:9 overruns:0 frame:0
          TX packets:445 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:62037 (60.5 KiB)  TX bytes:47940 (46.8 KiB)

bash-4.1$ echo $?
0
bash-4.1$ touch /tmp/sshd-connected-to-wifi
bash-4.1$ /ebrmain/bin/netagent connect
[2285:09/07/18 20:08:49] netagent called with parameters < connect >
bash-4.1$ export PATH="$SSHDIR"/usr/bin:"$SSHDIR"/usr/sbin:$PATH
<_PATH=/mnt/ext1/applications/pb_sshd:$LD_LIBRARY_PATH                       
bash-4.1$ cd $SSHDIR
bash-4.1$ 
bash-4.1$ ./server-keygen.sh
bash-4.1$ "$SSHDIR"/usr/sbin/sshd \
>   -f "$SSHDIR"/etc/ssh/sshd_config \
>   -h "$SSHDIR"/etc/ssh/ssh_host_key \
>   -h "$SSHDIR"/etc/ssh/ssh_host_dsa_key \
>   -h "$SSHDIR"/etc/ssh/ssh_host_ecdsa_key \
>   -h "$SSHDIR"/etc/ssh/ssh_host_rsa_key \
>   -d -e
bash-4.1$
I was alreday connected because I can use utelnetd
Every command run ok.

By the way I don't need ssh security.
If I can transfer files between pocket and PC with utelnetd
or with some kind of sample plain ftp server I'm ok. I will give up from ssh.
cprog is offline   Reply With Quote
Old 07-09-2018, 07:47 PM   #14
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,541
Karma: 9059992
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
I don't understand why sshd quits without any error messages. Perhaps you can try one last time using the "-d -d -d" option to increase the debugging output. Maybe you can also see something in the kernel log using the dmesg command. Otherwise, I'm out of ideas. Sorry that it has been so much trouble for you.

Someone had got vsftpd to work on pocketbook devices in the past. You can get the package at: https://www.mobileread.com/forums/sh...69&postcount=8. Maybe you'll have better luck with that.

P.S. That version of vsftpd-launcher.app requires a BACK button to quit. So, I hacked a new version that also quits if you long-press the NEXT or PREV buttons, since touchscreen devices don't have BACK buttons anymore.
Attached Files
File Type: zip vsftpd-launcher.app.zip (2.9 KB, 18 views)

Last edited by rkomar; 07-09-2018 at 09:05 PM.
rkomar is offline   Reply With Quote
Old 07-10-2018, 02:37 AM   #15
cprog
Junior Member
cprog began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: PocketBook InkPad 3
One big big thank you, rkomar !
vsftpd works ! I'm really happy

Just for info and completness:

Triple -d doesn't show more info.
dmsg too.

I thank that on my device ssh do just nothing
The big problem is OpenSSH

It doesn't matter because plain ftp works
cprog is offline   Reply With Quote
Reply

Tags
openssl mismatch, pocketbook inkpad 3, sshd

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Framework doesn't start psyche17 Amazon Kindle 0 12-16-2016 09:23 AM
pbsshd on PB622: ssh not working! (but scp is) alphane PocketBook 12 08-19-2014 12:30 PM
Can not start recoll from calibre /opt/calibre/lib/libz.so.1: no version information Satas Development 5 04-19-2013 11:22 PM
Calibre doesn't start slothrop Calibre 1 12-14-2009 09:23 PM
Calibre doesn´t start... chili_666 Calibre 3 02-12-2009 01:09 AM


All times are GMT -4. The time now is 05:19 PM.


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