2005-03-07 08:34:04 +01:00
|
|
|
# $OpenBSD: login-timeout.sh,v 1.4 2005/02/27 23:13:36 djm Exp $
|
2004-02-29 10:30:17 +01:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="connect after login grace timeout"
|
|
|
|
|
|
|
|
trace "test login grace with privsep"
|
|
|
|
echo "LoginGraceTime 10s" >> $OBJ/sshd_config
|
|
|
|
echo "MaxStartups 1" >> $OBJ/sshd_config
|
|
|
|
start_sshd
|
|
|
|
|
2005-03-07 08:34:04 +01:00
|
|
|
(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
|
2004-02-29 10:30:17 +01:00
|
|
|
sleep 15
|
|
|
|
${SSH} -F $OBJ/ssh_config somehost true
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
fail "ssh connect after login grace timeout failed with privsep"
|
|
|
|
fi
|
|
|
|
|
2010-08-12 18:43:13 +02:00
|
|
|
$SUDO kill `$SUDO cat $PIDFILE`
|
2004-02-29 10:30:17 +01:00
|
|
|
|
|
|
|
trace "test login grace without privsep"
|
2004-03-07 19:40:01 +01:00
|
|
|
echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config
|
2004-02-29 10:30:17 +01:00
|
|
|
start_sshd
|
|
|
|
|
2005-03-07 08:34:04 +01:00
|
|
|
(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
|
2004-02-29 10:30:17 +01:00
|
|
|
sleep 15
|
|
|
|
${SSH} -F $OBJ/ssh_config somehost true
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
fail "ssh connect after login grace timeout failed without privsep"
|
|
|
|
fi
|