• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#	$OpenBSD: keyscan.sh,v 1.5 2015/09/11 03:44:21 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`
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