freebsd_amp_hwpstate/regress/login-timeout.sh

30 lines
844 B
Bash
Raw Normal View History

2005-06-05 15:40:50 +00:00
# $OpenBSD: login-timeout.sh,v 1.4 2005/02/27 23:13:36 djm Exp $
2004-04-20 09:35:04 +00: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-06-05 15:40:50 +00:00
(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
2004-04-20 09:35:04 +00: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
2004-10-28 16:03:53 +00:00
$SUDO kill `cat $PIDFILE`
2004-04-20 09:35:04 +00:00
trace "test login grace without privsep"
echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config
start_sshd
2005-06-05 15:40:50 +00:00
(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
2004-04-20 09:35:04 +00: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