Make sure permissions on the private host key file is tight enough that
sshd doesn't complain. Quote $srcdir to try to cope with embedded spaces.
This commit is contained in:
parent
11ca8d5583
commit
5e80055d22
@ -9,15 +9,15 @@ srcdir=${srcdir:-$PWD}
|
|||||||
SSHD=${SSHD:-/usr/sbin/sshd}
|
SSHD=${SSHD:-/usr/sbin/sshd}
|
||||||
|
|
||||||
cmd="./ssh2${EXEEXT}"
|
cmd="./ssh2${EXEEXT}"
|
||||||
srcdir=`cd $srcdir; pwd`
|
srcdir=`cd "$srcdir"; pwd`
|
||||||
|
|
||||||
PRIVKEY=$srcdir/etc/user
|
PRIVKEY=$srcdir/etc/user
|
||||||
export PRIVKEY
|
export PRIVKEY
|
||||||
PUBKEY=$srcdir/etc/user.pub
|
PUBKEY=$srcdir/etc/user.pub
|
||||||
export PUBKEY
|
export PUBKEY
|
||||||
|
|
||||||
chmod go-r $srcdir/etc/host*
|
chmod go-rwx "$srcdir"/etc/host*
|
||||||
$SSHD -f /dev/null -h $srcdir/etc/host \
|
$SSHD -f /dev/null -h "$srcdir"/etc/host \
|
||||||
-o 'Port 4711' \
|
-o 'Port 4711' \
|
||||||
-o 'Protocol 2' \
|
-o 'Protocol 2' \
|
||||||
-o "AuthorizedKeysFile $srcdir/etc/user.pub" \
|
-o "AuthorizedKeysFile $srcdir/etc/user.pub" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user