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 10-05-2015, 10:04 AM   #61
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
The sshd.log file is only created when the sshd daemon is started in the sshd_start.app script. I don't see how it would be created when the device starts up (unless the device automatically runs the sshd_start.app script for some reason).

In the sshd_start.app script, change the "-q" to a "-d" in the line:

Code:
	-q -e 1> "$SSHDIR"/sshd.log 2> "$SSHDIR"/sshd.log
and it should output more debugging information to the log file. Perhaps you will be able to see the problem then. Note that the information may not have been written to the log file yet if the sshd daemon is still running. The system may be buffering the output before writing it to the log file. In that case, you need to stop the daemon with the sshd_stop.app script before the sshd.log file is updated.
rkomar is offline   Reply With Quote
Old 10-05-2015, 01:30 PM   #62
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
system freeze with detailed debugging log

Thanks for your rapid reply.
I did make the "-q" to a "-d"in the line 37.

After unplugging the reader I started the "sshd_start.app" by pressing the corresponding ikon. The ikon remained black and the entire screen froze. It did not repond to the "sshd_stop.app" and the system time remained the time I stated the "sshd_start.app" - even after 5 minutes waiting. Since I did not find any reset button I did plug the reader into the USB port of the Win7 PC again and the reader returned to the home screen. I did not see any dialog if the USB connection is for charging only or a PC connection (not sure on a proper translation).
I unplugged the reader again, connected it again and the standard dialog box on the type of connection showed up again. I did obtain this time a 1.2 k sshd.log file. It was not empty.
I tried to repeat this and the reader did not respond again to any button I pushed after starting the "sshd_start.app". This time when I reconnected to the reader to the PC the dialog box on charging PC connection showed up again. After choosing the PC connetion the reader screen changed to the screen indicating a PC connection.
After the two attempts I did obtain this log file:
"
debug1: sshd version OpenSSH_5.9p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: read PEM private key done: type ECDSA
debug1: private host key: #2 type 3 ECDSA
debug1: read PEM private key done: type RSA
debug1: private host key: #3 type 1 RSA
debug1: setgroups() failed: Operation not permitted
debug1: rexec_argv[0]='/mnt/ext1/applications/pb_sshd/usr/sbin/sshd'
debug1: rexec_argv[1]='-f'
debug1: rexec_argv[2]='/mnt/ext1/applications/pb_sshd/etc/ssh/sshd_config'
debug1: rexec_argv[3]='-h'
debug1: rexec_argv[4]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_key'
debug1: rexec_argv[5]='-h'
debug1: rexec_argv[6]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_dsa_key'
debug1: rexec_argv[7]='-h'
debug1: rexec_argv[8]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_ecdsa_key'
debug1: rexec_argv[9]='-h'
debug1: rexec_argv[10]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_rsa_key'
debug1: rexec_argv[11]='-d'
debug1: rexec_argv[12]='-e'
Set /proc/self/oom_score_adj from -1000 to -1000
socket: Address family not supported by protocol
debug1: Bind to port 1124 on 0.0.0.0.
Server listening on 0.0.0.0 port 1124.
"

From the creation time I am guessing this file was generated in the 2nd attempts.
For your convenience I am attaching the logfile to this post - I hope it will be easier to read for you in an editor. I had to safe it as a .log.txt file the board system did not accept any .log file (?)

From what I guess, the first line of interest is:
debug1: setgroups() failed: Operation not permitted

What does the setgroups command make? Does it need any rights, Pocketbook removed?
Attached Files
File Type: txt sshd.log.txt (1.2 KB, 350 views)

Last edited by cherocee; 10-05-2015 at 02:17 PM. Reason: typos
cherocee is offline   Reply With Quote
Advert
Old 10-05-2015, 02:27 PM   #63
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
It's normal that the screen freezes when sshd is run with the "-d" option (because the script doesn't stop running until a connection is made and then disconnected). So far, it looks like the script is running normally and that there are no problems. Try putting the "-q" option back instead of the "-d" option, and then adding the following line at the end of the script:

Code:
ifconfig eth0 1> /mnt/ext1/applications/pb_sshd/ifconfig.out 2> /mnt/ext1/applications/pb_sshd/ifconfig.out
This will create a file called ifconfig.out in the pb_sshd directory, and the file will contain the output of the ifconfig command. You should be able to read the file afterwards and see what IP address the device is listening at.

P.S. I also see the setgroups() and socket error messages on my devices, and sshd workds properly there.

Last edited by rkomar; 10-05-2015 at 02:32 PM. Reason: Added postscript
rkomar is offline   Reply With Quote
Old 10-05-2015, 02:59 PM   #64
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
Thanks for your rapid reply and additional work.

I did make the changes you suggested in the sshd_start.app.

Started the sshd_start.app, the reader returned immediately to the home screen. To have the log files created I did start the sshd_stop.app immediately afterwards and the reader returned to the home screan.

Then I was connecting the reader to my PC. An empty sshd.log of 0 kB in size and and ifconfig.out file was created.

The information in the ifconfig.out is:

ifconfig: eth0: error fetching interface information: Device not found

Does that mean the WiFi adapter is not found?
cherocee is offline   Reply With Quote
Old 10-05-2015, 03:27 PM   #65
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
It sounds like the netagent command failed to bring the eth0 interface up. Maybe the command has been moved to another directory, or removed from the device altogether. I only have an older Touch Lux (623) with me, and I don't know what's available on the Touch Lux 3. I'll see if I can examine the firmware update file to see what's on the device, but it's possible you may have to install the pbterm application yourself and explore your device via the command-line.

Another possibility for now is to start the WiFi yourself from the Settings tab, and then run the sshd_start.app right afterwards. It should then run without needing to bring up the WiFi interface itself via netagent.

Last edited by rkomar; 10-05-2015 at 03:29 PM.
rkomar is offline   Reply With Quote
Advert
Old 10-05-2015, 03:48 PM   #66
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
My test were run with the touch Lux 2 not 3

Thanks again for your efforts.
I am not sure that I can install the pbterm application myself - I do not have anything close to an idea where to get started.
I will to start WIFi from the settings tab and then the sshd_start app. However, than I am still left with the PC side of the secure FTP. With PC (Windows) programs I could not connect so far to the ebook reader. I will give it a trial from LINUX. So far I figured I could not connect because the severer on the pocketbook did not run.
How can I test (find out) if the sftp server is running on the pocketbook 626?

Edit: From windows I did make a couple of attempts with File Zilla as described for Filezilla in Post 27 (https://www.mobileread.com/forums/sho...&postcount=27=) in this thread. Before that I did create Keys using puttygen.exe. On the reader I did create an empty File called authorized_keys2 in /pb_sshd/etc/ssh/. I and pasted the contend of the public key in the authorized_keys2.

I Started Wifi with the setting dialog and than @Sshd_start on reader.
With Filezilla I tried to connect via stp and ended up with:
Status: Connecting to 192.168.1.116:1124...
Response: fzSftp started, protocol_version=3
Command: keyfile "D:\downloads\Pocketbook_touc_lux_2_626\ssh_keys_p uttygen\private_key.ppk"
Command: open "sreader@192.168.1.116" 1124
Command: Pass: ***
Error: Authentication failed.
Error: Critical error: Could not connect to server

Does this tell me that in principle the sftp server is working on pocketbook and I have issues with the key authentication?

Last edited by cherocee; 10-05-2015 at 05:09 PM. Reason: typos
cherocee is offline   Reply With Quote
Old 10-05-2015, 06:30 PM   #67
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
Thumbs up working after starting over again with windows 7 and filezilla

Hello,

I started from scratch again. To this end I connected the reader via USB port to the Win7 PC and I deleted the @Sshd_start.app, @Sshd_stop.app and the pb_sshd directory form the applications folder. Then, I did re-extract the ziparchive pbsshd_1.3_fwv5.zip to the applications folder. In the pb_sshd folder I did created a file (without extension) called create-keys.

After unplugging the reader form the USB port I did start the WiFi and the @Sshd_start.app.

Then I connected the reader to the PC using the USB port. In the /applications/pb_sshd/etc/ssh/ I did find this time a file called /authorized_keys2 that contained a long text string. I assume that is my public key.
In the pb_sshd directory I did find two files called id_rsa and id_rsa.pub I moved these files to a dedicated folder on my PC.

After unplugging the reader I did start first the readers WiFi from the seeting dialogue and after I saw the WiFi Icon in the upper right corner of the readers screen I did start the @Sshd_start app. The WLAN on the router was switched on constantly.

On the Win7 PC I started Filezilla and added the public key (edit, setting, sftp, add keys file) to the program. According to my router my ebook was assigned the IP 192.168.1.116 (This is most likely different for any other WLAN and your ebook). Using File, Site manager I defined a new site wit IP 192.168.1.116 and port 1124. I chose SFTP protocol and user sreader.

I could then connect with out a password. However, during the first connection, I did receive some sort or error / warning message stating something like an update of the security keys or connection to the wrong server.I did continue and accepted an update of the security information.

The external SD Card I did find under /mnt/ext2 in the remote (left) site field.
Copying of files to the SD Card was possible. I think careful use of the mouse is a good idea so you do not move system files and folders on the reader to a different position. I guess moving system files can permanently damage your reader.

I do hope the brief description will help other Windows users to transfer books to their Pockebook Lux 2 (626) directly in their private WLAN and keeping their private data private.

Thanks rkomar for this brilliant development

cheers
che

Last edited by cherocee; 10-05-2015 at 06:33 PM.
cherocee is offline   Reply With Quote
Old 10-05-2015, 08:00 PM   #68
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
I wasn't able to unpack the 5.8 or 5.9 firmware updates for the Touch Lux 2/3. So, I have no idea why the netagent program doesn't open the WiFi interface in the start script. Someone with access to the device will have to try to run netagent via pbterm to see what the correct command is.
rkomar is offline   Reply With Quote
Old 10-06-2015, 09:15 AM   #69
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
How difficult ist the use of pbterm?

How long does it take to get familiar with pbterm to find the information you need? Currently I did not find a lot information about pbterm doing a standard google search.
cherocee is offline   Reply With Quote
Old 10-06-2015, 09:53 AM   #70
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
pbterm provides a Unix shell command-line interface. If you're familiar with Unix shells, then pbterm is very easy and nice to use. If not, then you have to learn the basics of using a Unix shell first. It's not hard, but you do have to learn what the various common shell commands are, and how to use them. There are various resources online that help with that.

If you want to play around with a shell first, you can log into your device using ssh instead of sftp when the sshd server is running (see the pb_sshd README file). Unfortunately, because of unsolvable problems with permissions, the terminal you get using ssh is very basic. You don't get a command-line prompt, or a command history, nor can you use an editor within it. You have to type every command afresh at the blank line. To log out, just type "exit" in the terminal.
rkomar is offline   Reply With Quote
Old 10-06-2015, 05:10 PM   #71
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
I did work with UNIX shell commands before. However, not too often and this is some time ago. I think the last time I used photorec on LINUX to recover data from a crashed hard disk. Yet I feel capable of typing in commands in a shell and pipe the output into some document that I could provide. What would be the best way to get started with pterm? Is there a description (link)? - As indicated I did not find a lot of information with google - maybe I used the wrong terms for my search.What is the best starting point?
I do not quite understand how this works. Do I connect the Pocketboot via the USB port to a LINUX machine and send commands to the Pocketbook and see the response to the commands in some sort of command line ?
cherocee is offline   Reply With Quote
Old 10-06-2015, 05:22 PM   #72
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
You unpack the pbterm zip file and copy the files via USB to the /system directory as per the instructions in the included README file. The application runs on the screen of the device, and you input the commands using the software keyboard or the menu. You don't need a network connection to run it.
rkomar is offline   Reply With Quote
Old 10-07-2015, 03:49 PM   #73
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
I have pbterm running and entered the first couple of commands such as ls, ifconfig and similar.

Which command will show how to start WiFi?

Last edited by cherocee; 10-07-2015 at 05:10 PM. Reason: typos
cherocee is offline   Reply With Quote
Old 10-07-2015, 07:38 PM   #74
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,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
You can look at the sshd_start.app file, which is a shell script. In there, the netagent command is:

Code:
/ebrmain/bin/netagent connect
You can try typing that in and seeing what happens. If it doesn't work, you'll have to determine if it's a problem with the path (i.e. netagent being in a different directory than /ebrmain/bin), or with the "connect" option, or if netagent has been removed entirely from newer firmware versions.
rkomar is offline   Reply With Quote
Old 10-08-2015, 10:47 AM   #75
cherocee
Member
cherocee began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Nov 2014
Device: tablet, pocketbook touch lux 2 (626)
Thanks for the fast reply

I typed in pbterm

$ /ebrmain/bin/netagent connect

The System reply was

netagent called with parameters <connect>

I think the netagent is still existing in the system in this path and the parameter connect is accepted.

However, the network connection did not start? How do I find out on the parameters of netagent - help did not work with netagent:

$ help netagent

resulted in:

Build-commands
----------------
[[[bg break cd chdir continue echo eval exec exit export
false fg getopts hash help history jobs kill local printif pwd
read readonly return set shift source test times trap true type
unlimit unmask unset wait

How do I find information on the parameters of netagent?

Last edited by cherocee; 10-08-2015 at 03:45 PM.
cherocee 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
Root / Shell / Term / SSH / editor on a Kindle 2? JDShaffer Kindle Developer's Corner 2 12-13-2010 06:11 PM
Can't get shell access MarkRPenn iRex 11 10-26-2007 06:58 PM
Shell Access ? grayfox iRex 6 10-14-2007 04:56 PM
FTP access open to new developers Alexander Turcic Announcements 2 05-05-2007 11:02 AM


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


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