mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-13 21:21:16 +00:00
upstream: Only add ssh-dss to allowed key types if it's supported
by the binary. OpenBSD-Regress-ID: 395a54cab16e9e4ece9aec047ab257954eebd413
This commit is contained in:
parent
fd0684b319
commit
7e66b7d98c
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: agent.sh,v 1.14 2019/01/28 00:12:36 dtucker Exp $
|
# $OpenBSD: agent.sh,v 1.15 2019/07/23 07:39:43 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="simple agent test"
|
tid="simple agent test"
|
||||||
@ -27,9 +27,6 @@ ${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_ca_key \
|
|||||||
trace "overwrite authorized keys"
|
trace "overwrite authorized keys"
|
||||||
printf '' > $OBJ/authorized_keys_$USER
|
printf '' > $OBJ/authorized_keys_$USER
|
||||||
|
|
||||||
echo "PubkeyAcceptedKeyTypes +ssh-dss" >> $OBJ/ssh_proxy
|
|
||||||
echo "PubkeyAcceptedKeyTypes +ssh-dss" >> $OBJ/sshd_proxy
|
|
||||||
|
|
||||||
for t in ${SSH_KEYTYPES}; do
|
for t in ${SSH_KEYTYPES}; do
|
||||||
# generate user key for agent
|
# generate user key for agent
|
||||||
rm -f $OBJ/$t-agent $OBJ/$t-agent.pub*
|
rm -f $OBJ/$t-agent $OBJ/$t-agent.pub*
|
||||||
@ -75,6 +72,10 @@ fi
|
|||||||
|
|
||||||
for t in ${SSH_KEYTYPES}; do
|
for t in ${SSH_KEYTYPES}; do
|
||||||
trace "connect via agent using $t key"
|
trace "connect via agent using $t key"
|
||||||
|
if [ "$t" = "ssh-dss" ]; then
|
||||||
|
echo "PubkeyAcceptedKeyTypes +ssh-dss" >> $OBJ/ssh_proxy
|
||||||
|
echo "PubkeyAcceptedKeyTypes +ssh-dss" >> $OBJ/sshd_proxy
|
||||||
|
fi
|
||||||
${SSH} -F $OBJ/ssh_proxy -i $OBJ/$t-agent.pub -oIdentitiesOnly=yes \
|
${SSH} -F $OBJ/ssh_proxy -i $OBJ/$t-agent.pub -oIdentitiesOnly=yes \
|
||||||
somehost exit 52
|
somehost exit 52
|
||||||
r=$?
|
r=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user