View Single Post
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