- stevesk@cvs.openbsd.org 2009/12/25 19:40:21
[openssh-git.git] / regress / login-timeout.sh
blob15a887f74b1dc12e30f70f2e824df2249edcb758
1 # $OpenBSD: login-timeout.sh,v 1.4 2005/02/27 23:13:36 djm Exp $
2 # Placed in the Public Domain.
4 tid="connect after login grace timeout"
6 trace "test login grace with privsep"
7 echo "LoginGraceTime 10s" >> $OBJ/sshd_config
8 echo "MaxStartups 1" >> $OBJ/sshd_config
9 start_sshd
11 (echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
12 sleep 15
13 ${SSH} -F $OBJ/ssh_config somehost true
14 if [ $? -ne 0 ]; then
15 fail "ssh connect after login grace timeout failed with privsep"
18 $SUDO kill `cat $PIDFILE`
20 trace "test login grace without privsep"
21 echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config
22 start_sshd
24 (echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
25 sleep 15
26 ${SSH} -F $OBJ/ssh_config somehost true
27 if [ $? -ne 0 ]; then
28 fail "ssh connect after login grace timeout failed without privsep"