summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/hostkey-agent.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/regress/hostkey-agent.sh b/regress/hostkey-agent.sh
index 84fb2c2d2..fddb0415b 100644
--- a/regress/hostkey-agent.sh
+++ b/regress/hostkey-agent.sh
@@ -1,9 +1,9 @@
1# $OpenBSD: hostkey-agent.sh,v 1.2 2015/01/19 06:01:32 djm Exp $ 1# $OpenBSD: hostkey-agent.sh,v 1.3 2015/01/20 08:02:33 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="hostkey agent" 4tid="hostkey agent"
5 5
6rm -f $OBJ/agent.* $OBJ/ssh_proxy.orig $OBJ/known_hosts.orig 6rm -f $OBJ/agent-key.* $OBJ/ssh_proxy.orig $OBJ/known_hosts.orig
7 7
8trace "start agent" 8trace "start agent"
9eval `${SSHAGENT} -s` > /dev/null 9eval `${SSHAGENT} -s` > /dev/null
@@ -15,16 +15,16 @@ echo "HostKeyAgent $SSH_AUTH_SOCK" >> $OBJ/sshd_proxy.orig
15 15
16trace "load hostkeys" 16trace "load hostkeys"
17for k in `${SSH} -Q key-plain` ; do 17for k in `${SSH} -Q key-plain` ; do
18 ${SSHKEYGEN} -qt $k -f $OBJ/agent.$k -N '' || fatal "ssh-keygen $k" 18 ${SSHKEYGEN} -qt $k -f $OBJ/agent-key.$k -N '' || fatal "ssh-keygen $k"
19 ( 19 (
20 echo -n 'localhost-with-alias,127.0.0.1,::1 ' 20 echo -n 'localhost-with-alias,127.0.0.1,::1 '
21 cat $OBJ/agent.$k.pub 21 cat $OBJ/agent-key.$k.pub
22 ) >> $OBJ/known_hosts.orig 22 ) >> $OBJ/known_hosts.orig
23 ${SSHADD} $OBJ/agent.$k >/dev/null 2>&1 || \ 23 ${SSHADD} $OBJ/agent-key.$k >/dev/null 2>&1 || \
24 fatal "couldn't load key $OBJ/agent.$k" 24 fatal "couldn't load key $OBJ/agent-key.$k"
25 echo "Hostkey $OBJ/agent.${k}" >> sshd_proxy.orig 25 echo "Hostkey $OBJ/agent-key.${k}" >> sshd_proxy.orig
26 # Remove private key so the server can't use it. 26 # Remove private key so the server can't use it.
27 rm $OBJ/agent.$k || fatal "couldn't rm $OBJ/agent.$k" 27 rm $OBJ/agent-key.$k || fatal "couldn't rm $OBJ/agent-key.$k"
28done 28done
29cp $OBJ/known_hosts.orig $OBJ/known_hosts 29cp $OBJ/known_hosts.orig $OBJ/known_hosts
30 30