1 # $OpenBSD: login-timeout.sh,v 1.9 2017/08/07 00:53:51 dtucker Exp $
2 # Placed in the Public Domain.
4 tid="connect after login grace timeout"
6 trace "test login grace with privsep"
7 cp $OBJ/sshd_config $OBJ/sshd_config.orig
8 grep -vi LoginGraceTime $OBJ/sshd_config.orig > $OBJ/sshd_config
9 echo "LoginGraceTime 10s" >> $OBJ/sshd_config
10 echo "MaxStartups 1" >> $OBJ/sshd_config
13 (echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 &
15 ${SSH} -F $OBJ/ssh_config somehost true
17 fail "ssh connect after login grace timeout failed"