xref: /freebsd/crypto/openssh/regress/keyscan.sh (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1#	$OpenBSD: keyscan.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
2#	Placed in the Public Domain.
3
4tid="keyscan"
5
6# remove DSA hostkey
7rm -f ${OBJ}/host.dsa
8
9start_sshd
10
11KEYTYPES="rsa dsa"
12if ssh_version 1; then
13	KEYTYPES="${KEYTYPES} rsa1"
14fi
15
16for t in $KEYTYPES; do
17	trace "keyscan type $t"
18	${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \
19		> /dev/null 2>&1
20	r=$?
21	if [ $r -ne 0 ]; then
22		fail "ssh-keyscan -t $t failed with: $r"
23	fi
24done
25