Lines Matching full:agent
1 # $OpenBSD: hostkey-agent.sh,v 1.13 2021/09/30 05:20:08 dtucker Exp $
4 tid="hostkey agent"
6 rm -f $OBJ/agent-key.* $OBJ/ssh_proxy.orig $OBJ/known_hosts.orig $OBJ/agent-ca*
8 trace "start agent"
11 [ $r -ne 0 ] && fatal "could not start ssh-agent: exit code $r"
18 ${SSHKEYGEN} -qt ed25519 -f $OBJ/agent-ca -N '' || fatal "ssh-keygen CA"
22 ${SSHKEYGEN} -qt $k -f $OBJ/agent-key.$k -N '' || fatal "ssh-keygen $k"
23 ${SSHKEYGEN} -s $OBJ/agent-ca -qh -n localhost-with-alias \
24 -I localhost-with-alias $OBJ/agent-key.$k.pub || \
26 ${SSHADD} -k $OBJ/agent-key.$k >/dev/null 2>&1 || \
27 fatal "couldn't load key $OBJ/agent-key.$k"
29 rm $OBJ/agent-key.$k || fatal "couldn't rm $OBJ/agent-key.$k"
31 rm $OBJ/agent-ca # Don't need CA private any more either
39 echo "Hostkey $OBJ/agent-key.${k}" >> $OBJ/sshd_proxy
42 cat $OBJ/agent-key.$k.pub) > $OBJ/known_hosts
62 echo "Hostkey $OBJ/agent-key.${k}.pub" >> $OBJ/sshd_proxy
63 echo "HostCertificate $OBJ/agent-key.${k}-cert.pub" >> $OBJ/sshd_proxy
64 test -f $OBJ/agent-key.${k}.pub || fatal "no $k key"
65 test -f $OBJ/agent-key.${k}-cert.pub || fatal "no $k cert"
71 cat $OBJ/agent-ca.pub) > $OBJ/known_hosts
85 trace "kill agent"