diff options
author | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
commit | e88de75a1a236779a10e8ccbcc51d25308be8840 (patch) | |
tree | 7495477a2a7d0cac17a9fcded020b6ea816182ef /regress/brokenkeys.sh | |
parent | 30a0f9443782cd9d7308acd09430bf586186aa55 (diff) | |
parent | 5d05471f6657646d1d6500c7c43134462c407ee6 (diff) |
Merge 4.0p1 to the trunk.
Diffstat (limited to 'regress/brokenkeys.sh')
-rw-r--r-- | regress/brokenkeys.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/brokenkeys.sh b/regress/brokenkeys.sh new file mode 100644 index 000000000..3e70c348a --- /dev/null +++ b/regress/brokenkeys.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | # $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="broken keys" | ||
5 | |||
6 | KEYS="$OBJ/authorized_keys_${USER}" | ||
7 | |||
8 | start_sshd | ||
9 | |||
10 | mv ${KEYS} ${KEYS}.bak | ||
11 | |||
12 | # Truncated key | ||
13 | echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS | ||
14 | cat ${KEYS}.bak >> ${KEYS} | ||
15 | cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER | ||
16 | |||
17 | ${SSH} -2 -F $OBJ/ssh_config somehost true | ||
18 | if [ $? -ne 0 ]; then | ||
19 | fail "ssh connect with protocol $p failed" | ||
20 | fi | ||
21 | |||
22 | mv ${KEYS}.bak ${KEYS} | ||
23 | |||