~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to regress/brokenkeys.sh

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2005-10-10 20:10:01 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051010201001-rno2f5bno6e6wo6t
Tags: upstream-4.1p1
ImportĀ upstreamĀ versionĀ 4.1p1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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