Lines Matching full:primary
34 # The "primary" key type is ed25519 since it's supported even when built
36 primary="ssh-ed25519"
37 secondary="$primary"
84 dossh -oHostKeyAlgorithms=$primary -oStrictHostKeyChecking=no
87 check_key_present $primary || fail "unstrict didn't learn key"
110 # Change one hostkey (non primary) and relearn
111 if [ "$primary" != "$secondary" ]; then
112 verbose "learn changed non-primary hostkey type=${secondary}"
125 # Add new hostkey (primary type) to sshd and connect
126 verbose "learn new primary hostkey"
127 ${SSHKEYGEN} -qt ${primary} -f $OBJ/hkr.${primary}-new -N '' || fatal "ssh-keygen ed25519"
128 ( cat $OBJ/sshd_proxy.orig ; echo HostKey $OBJ/hkr.${primary}-new ) \
131 dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=${primary},$all_algs
133 check_key_present ${primary} || fail "current key missing"
134 check_key_present ${primary} $OBJ/hkr.${primary}-new.pub || fail "new key missing"
136 # Remove old hostkey (primary type) from sshd
137 verbose "rotate primary hostkey"
139 mv $OBJ/hkr.${primary}.pub $OBJ/hkr.${primary}.pub.old
140 mv $OBJ/hkr.${primary}-new.pub $OBJ/hkr.${primary}.pub
141 mv $OBJ/hkr.${primary}-new $OBJ/hkr.${primary}
143 dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=${primary},$all_algs
145 check_key_present ${primary} $OBJ/hkr.${primary}.pub.old && fail "old key present"
146 check_key_present ${primary} || fail "didn't learn changed key"
149 verbose "check rotate primary hostkey"
150 dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=${primary}
152 check_key_present ${primary} || fail "didn't learn changed key"