blob: 3e70c348ac36ff0e52cc1f2aef5d51333b2cf165 [file] [log] [blame]
Darren Tucker124f58e2004-12-06 23:07:37 +11001# $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $
2# Placed in the Public Domain.
3
4tid="broken keys"
5
6KEYS="$OBJ/authorized_keys_${USER}"
7
8start_sshd
9
10mv ${KEYS} ${KEYS}.bak
11
12# Truncated key
13echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS
14cat ${KEYS}.bak >> ${KEYS}
15cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
16
17${SSH} -2 -F $OBJ/ssh_config somehost true
18if [ $? -ne 0 ]; then
19 fail "ssh connect with protocol $p failed"
20fi
21
22mv ${KEYS}.bak ${KEYS}
23