xref: /freebsd/crypto/openssh/regress/keyscan.sh (revision 6829dae12bb055451fa467da4589c43bd03b1e64)
1#	$OpenBSD: keyscan.sh,v 1.6 2017/04/30 23:34:55 djm 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=`${SSH} -Q key-plain`
12for t in $KEYTYPES; do
13	trace "keyscan type $t"
14	${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \
15		> /dev/null 2>&1
16	r=$?
17	if [ $r -ne 0 ]; then
18		fail "ssh-keyscan -t $t failed with: $r"
19	fi
20done
21