brokenkeys.sh revision 285830
1202719Sgabor# $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $ 2265533Sdelphij# Placed in the Public Domain. 3202719Sgabor 4202719Sgabortid="broken keys" 5202719Sgabor 6202719SgaborKEYS="$OBJ/authorized_keys_${USER}" 7202719Sgabor 8202719Sgaborstart_sshd 9202719Sgabor 10202719Sgabormv ${KEYS} ${KEYS}.bak 11202719Sgabor 12202719Sgabor# Truncated key 13202719Sgaborecho "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS 14202719Sgaborcat ${KEYS}.bak >> ${KEYS} 15202719Sgaborcat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER 16202719Sgabor 17202719Sgabor${SSH} -2 -F $OBJ/ssh_config somehost true 18202719Sgaborif [ $? -ne 0 ]; then 19202719Sgabor fail "ssh connect with protocol $p failed" 20202719Sgaborfi 21202719Sgabor 22202719Sgabormv ${KEYS}.bak ${KEYS} 23202719Sgabor 24202719Sgabor