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 04-19-2012, 09:20 AM   #31
Hr.stein
Member
Hr.stein began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Apr 2012
Device: PB 611
The sshd.log(use sftp get):
--------------------
/mnt/ext1/applications/pb_sshd/usr/sbin/sshd: /lib/libcrypto.so.0.9.8: no version information available (required by /mnt/ext1/applications/pb_sshd/usr/sbin/sshd)
debug1: sshd version OpenSSH_5.9p1^M
debug1: private host key: #0 type 0 RSA1^M
debug1: read PEM private key done: type DSA^M
debug1: private host key: #1 type 2 DSA^M
debug1: read PEM private key done: type ECDSA^M
debug1: private host key: #2 type 3 ECDSA^M
debug1: read PEM private key done: type RSA^M
debug1: private host key: #3 type 1 RSA^M
debug1: setgroups() failed: Operation not permitted^M
debug1: rexec_argv[0]='/mnt/ext1/applications/pb_sshd/usr/sbin/sshd'^M
debug1: rexec_argv[1]='-f'^M
debug1: rexec_argv[2]='/mnt/ext1/applications/pb_sshd/etc/ssh/sshd_config'^M
debug1: rexec_argv[3]='-h'^M
debug1: rexec_argv[4]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_key'^M
debug1: rexec_argv[5]='-h'^M
debug1: rexec_argv[6]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_dsa_key'^M
debug1: rexec_argv[7]='-h'^M
debug1: rexec_argv[8]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_ecdsa_key'^M
debug1: rexec_argv[9]='-h'^M
debug1: rexec_argv[10]='/mnt/ext1/applications/pb_sshd/etc/ssh/ssh_host_rsa_key'^M
debug1: rexec_argv[11]='-d'^M
debug1: rexec_argv[12]='-e'^M
Set /proc/self/oom_adj from 0 to -17^M
socket: Address family not supported by protocol^M
debug1: Bind to port 1124 on 0.0.0.0.^M
Server listening on 0.0.0.0 port 1124.^M
debug1: Server will not fork when running in debugging mode.^M
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7^M
/mnt/ext1/applications/pb_sshd/usr/sbin/sshd: /lib/libcrypto.so.0.9.8: no version information available (required by /mnt/ext1/applications/pb_sshd/usr/sbin/sshd)
debug1: sshd version OpenSSH_5.9p1^M
debug1: private host key: #0 type 0 RSA1^M
debug1: read PEM private key done: type DSA^M
debug1: private host key: #1 type 2 DSA^M
debug1: read PEM private key done: type ECDSA^M
debug1: private host key: #2 type 3 ECDSA^M
debug1: read PEM private key done: type RSA^M
debug1: private host key: #3 type 1 RSA^M
debug1: setgroups() failed: Operation not permitted^M
debug1: inetd sockets after dupping: 3, 3^M
Connection from 192.168.1.6 port 52222^M
debug1: Client protocol version 2.0; client software version OpenSSH_5.9^M
debug1: match: OpenSSH_5.9 pat OpenSSH*^M
debug1: Enabling compatibility mode for protocol 2.0^M
debug1: Local version string SSH-2.0-OpenSSH_5.9^M
debug1: list_hostkey_types: ssh-dss,ecdsa-sha2-nistp256,ssh-rsa^M
debug1: SSH2_MSG_KEXINIT sent^M
debug1: SSH2_MSG_KEXINIT received^M
debug1: kex: client->server aes128-ctr hmac-md5 none^M
debug1: kex: server->client aes128-ctr hmac-md5 none^M
debug1: expecting SSH2_MSG_KEX_ECDH_INIT^M
debug1: SSH2_MSG_NEWKEYS sent^M
debug1: expecting SSH2_MSG_NEWKEYS^M
debug1: SSH2_MSG_NEWKEYS received^M
debug1: KEX done^M
debug1: userauth-request for user reader service ssh-connection method none^M
debug1: attempt 0 failures 0^M
Failed none for reader from 192.168.1.6 port 52222 ssh2^M
debug1: userauth-request for user reader service ssh-connection method publickey^M
debug1: attempt 1 failures 0^M
debug1: test whether pkalg/pkblob are acceptable^M
debug1: temporarily_use_uid: 101/101 (e=101/101)^M
---------------------------------

Could be problem of the DOS/UNIX format?
or
/lib/libcrypto.so.0.9.8: no version information available?
Hr.stein is offline   Reply With Quote
Old 04-19-2012, 11:26 AM   #32
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I don't really see any problem in that output. The libcrypto warning is normal; I see it every time sshd starts on my device, and everything works properly there. I have never tested it from cygwin, though. Is it possible that you have a shell but don't realize it? Because of the problems getting a pseudo-tty on the device, you won't see a prompt for the shell. You also can't use the command history. But just typing commands and hitting return should show results.
rkomar is offline   Reply With Quote
 
Enthusiast
Old 04-19-2012, 01:00 PM   #33
Hr.stein
Member
Hr.stein began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Apr 2012
Device: PB 611
"pseudo-tty"? I did type something but still local. I think the link was shortly closed by remote host.

================
I used the method of rsh bz review:
@PC/cygwin ----------
nc -l -p 9999
(popup windows: asked to confirm by Win7)
@PB-----------
start "rsh.app"
------
then @ PC/cygwin:
BusyBox v1.16.1 (2010-12-16 16:24:43 EET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

$
--------------
Now i can type busybox/linux commands

But PB is locked, I cannot see any change or test the app...



$
Hr.stein is offline   Reply With Quote
Old 04-29-2012, 12:42 PM   #34
dark_skeleton
Junior Member
dark_skeleton began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: PocketBook 622
Hey there, good job getting so far
However on my Pocketbook 622, there is a problem with daemon quitting right after key auth. Error log:
Code:
Accepted publickey for reader from 192.168.12.106 port 22276 ssh2
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 256 win 16384 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_pty_req: session 0 alloc /var/dev/pts/0
chown(/var/dev/pts/0, 101, 5) failed: Operation not permitted
debug1: do_cleanup
debug1: session_pty_cleanup: session 0 release /var/dev/pts/0
;<
dark_skeleton is offline   Reply With Quote
Old 04-29-2012, 03:38 PM   #35
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
Quote:
Originally Posted by dark_skeleton View Post
Hey there, good job getting so far
However on my Pocketbook 622, there is a problem with daemon quitting right after key auth. Error log:
...
;<
Hmm, you're the second person to have troubles logging into a 622 with ssh. I'm not sure what's different on your devices, so I'm not sure what the problem is. When running in debug mode like you had, the server always quits after the first session ends. So, it's not clear whether the sshd daemon stopped because the session ended due to some other problem, or if it stopped because the daemon had an internal problem. Maybe you can try logging in with ssh using the '-T' or '-t' options to see if that affects things on the reader. Unfortunately, I'm travelling without my 902 at the moment, so I can't see if my device shows those same pty error messages or not. It's possible that they are normal and that something else is causing the session to end.
rkomar is offline   Reply With Quote
Old 05-04-2012, 01:41 PM   #36
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I think I see the problem with ssh logins on the 622. I looked inside the firmware, and saw that they changed the permissions on /dev/ptmx, but didn't change the /etc/fstab file to mount /dev/pts using gid=5. This breaks ssh logins, as I previously described in post #12 in this thread. I was afraid that @Seneca would convince them of making that change. Drat!
rkomar is offline   Reply With Quote
Old 05-11-2012, 03:32 AM   #37
dark_skeleton
Junior Member
dark_skeleton began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: PocketBook 622
Uh :/
So this leaves me with RSH access only :/
dark_skeleton is offline   Reply With Quote
Old 05-12-2012, 02:16 AM   #38
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
Quote:
Originally Posted by dark_skeleton View Post
Uh :/
So this leaves me with RSH access only :/
Have you tried logging in from the desktop using the "-T" option?

Code:
ssh -T -p 1124 reader@<insert-ip-address-here>
That works on my device if I change /etc/fstab back to the default. You don't get a prompt, nor command-line completion or history, but you can execute shell commands from there. You might be happier with RSH, though.
rkomar is offline   Reply With Quote
Old 06-17-2012, 08:36 AM   #39
avg_user
Member
avg_user began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jan 2011
Device: Pocketbook 903
Can you tell me if it's possible - let's say that I got a mobile Internet on my Pocketbook 902, I could run a ssh server on it and I could write a script that could connect to this server every 5 minutes and make it run on my router with OpenWRT installed and copy all the notes I have made to the USB disk connected to the router? I'm still looking for a way to synchronize my notes on the fly, and the suggestion to try sshd comes from rkomar in this thread http://www.mobileread.com/forums/sho....php?p=2095215
avg_user is offline   Reply With Quote
Old 06-17-2012, 02:24 PM   #40
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
Quote:
Originally Posted by avg_user View Post
Can you tell me if it's possible - let's say that I got a mobile Internet on my Pocketbook 902, I could run a ssh server on it and I could write a script that could connect to this server every 5 minutes and make it run on my router with OpenWRT installed and copy all the notes I have made to the USB disk connected to the router? I'm still looking for a way to synchronize my notes on the fly, and the suggestion to try sshd comes from rkomar in this thread http://www.mobileread.com/forums/sho....php?p=2095215
I think this would be easy to do if OpenWRT has a cron daemon running on it (for scheduling the job every five minutes), and a smarter ftp program like lftp for mirroring directories. You could then write a shell script on the router to check to see if the USB disk is there, make sure the output directory exists, and then mirror the reader's notes to the output directory. Once you've run the script by hand and seen that it works, you could add it to the system's crontab file to run every five minutes between certain hours of the day.

Maybe scp could work in place of the more complicated lftp mirroring program, but I'm not sure if it wouldn't just quit with an error if it tried to copy over an existing file that it got previously.

The problem I see with this is that the reader must have WiFi on at all times while you want synchronization. This will be a serious drain on the battery. Ideally, having a program on the reader that detects when notes have been added or modified and pushes the changes through a brief WiFi session would be best. But it would be a lot more work to get such a system working (on both the reader and the mirroring machine).

Edit: I'm adding a simple script file for using lftp to sync to a directory tree on the reader. You'd have to edit the values of the first four variables to point to the right places for you.

Code:
#!/bin/sh

# Edit these to point to the right places.
NOTESDIR="mnt/ext1/system/config/Active\ Contents"
COPYDIR=/home/robk/tmppb
READERIP=192.168.1.160
PASSWORD="XXX"

CMDS="set net:max-retries 1; set net:timeout 3; open -u reader:$PASSWORD -p 1124 sftp://$READERIP; mirror $NOTESDIR $COPYDIR/"

if [ -d "$COPYDIR" ]; then
  lftp -c "$CMDS"
else
  echo "$COPYDIR does not exist"
fi

Last edited by rkomar; 06-17-2012 at 05:38 PM. Reason: Added script file for lftp.
rkomar is offline   Reply With Quote
Old 06-17-2012, 04:39 PM   #41
avg_user
Member
avg_user began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jan 2011
Device: Pocketbook 903
It's not a big problem to do anything I want to on the router side, it's much worse with the Pocketbook. You are talking about WiFi, but would this solution work with the Internet via 3G? I realize I would have to have a public IP on the Pocketbook, that would cost some money, but would there be any problems?
avg_user is offline   Reply With Quote
Old 06-17-2012, 05:22 PM   #42
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
It depends. How would your router know the PocketBook's IP address? Would the ISP allow arbitrary connections to the reader (sometimes they scramble ports)? I don't know much about 3G (or any cellular networks). But you can try this sort of stuff without setting up the router first. Just try accessing your reader from your desktop via the cellular network IP address.
rkomar is offline   Reply With Quote
Old 06-17-2012, 07:33 PM   #43
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
It turns out that rsync is easy to build under cross-compilation. If you're not nervous about setting up an rsync daemon on your router, then you can use that to sync your notes. It might be easier that way if your router's IP address is more constant that your reader's. Then you can write a script on the reader to sync the notes directory to the server, keeping the 3G open just at that time.
rkomar is offline   Reply With Quote
Old 06-18-2012, 03:03 PM   #44
avg_user
Member
avg_user began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jan 2011
Device: Pocketbook 903
So I would have to run rsync on my router with public IP and run a scheduled job on my Pocketbook, let's say start the script every 5 minutes to send notes using the benefits of the incremental backup? Sounds doable, I think
avg_user is offline   Reply With Quote
Old 06-18-2012, 04:44 PM   #45
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: 1,697
Karma: 4340186
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
Quote:
Originally Posted by avg_user View Post
So I would have to run rsync on my router with public IP and run a scheduled job on my Pocketbook, let's say start the script every 5 minutes to send notes using the benefits of the incremental backup? Sounds doable, I think
You can password protect the rsync daemon to make it a bit safer. I don't think you can schedule jobs on the reader (you need root privileges for that), but you could have a script that did the syncing and then slept for five minutes, all within an infinite loop. The script could also enable and disable the network around the syncing, to drain the battery less. Take a look at the start and stop apps for my sshd daemon if you want an idea of how to do that using netagent. I can also upload a copy of rsync here if you don't feel up to building a cross-compiled version yourself.

If you felt really ambitious, you could try to make the script only rsync when the notes directory was modified since the last time it was done. You'd probably have to build and install something like find to do that.
rkomar 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 04:50 PM.


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