• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#	$OpenBSD: keyscan.sh,v 1.13 2020/01/22 07:31:27 dtucker Exp $
2#	Placed in the Public Domain.
3
4tid="keyscan"
5
6for i in $SSH_KEYTYPES; do
7	if [ -z "$algs" ]; then
8		algs="$i"
9	else
10		algs="$algs,$i"
11	fi
12done
13echo "HostKeyAlgorithms $algs" >> $OBJ/sshd_config
14
15start_sshd
16
17for t in $SSH_KEYTYPES; do
18	trace "keyscan type $t"
19	${SSHKEYSCAN} -t $t -T 15 -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \
20		> /dev/null 2>&1
21	r=$?
22	if [ $r -ne 0 ]; then
23		fail "ssh-keyscan -t $t failed with: $r"
24	fi
25done
26