mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
openssh: drop sshd support for DSA host keys
DSA keys have been deprecated for some time: https://www.gentoo.org/support/news-items/2015-08-13-openssh-weak-keys.html (From OE-Core rev: e6a1c8c4ef4a1d2add6a7492d43027c4c0682300) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
dd475f1d04
commit
e68613e0b8
@@ -60,9 +60,6 @@ done
|
||||
HOST_KEY_RSA=$(grep ^HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$(grep HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key
|
||||
HOST_KEY_DSA=$(grep ^HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$(grep HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key
|
||||
HOST_KEY_ECDSA=$(grep ^HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$(grep HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ')
|
||||
[ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key
|
||||
@@ -79,12 +76,7 @@ if [ ! -f $HOST_KEY_ECDSA ]; then
|
||||
echo " generating ssh ECDSA key..."
|
||||
generate_key $HOST_KEY_ECDSA ecdsa
|
||||
fi
|
||||
if [ ! -f $HOST_KEY_DSA ]; then
|
||||
echo " generating ssh DSA key..."
|
||||
generate_key $HOST_KEY_DSA dsa
|
||||
fi
|
||||
if [ ! -f $HOST_KEY_ED25519 ]; then
|
||||
echo " generating ssh ED25519 key..."
|
||||
generate_key $HOST_KEY_ED25519 ed25519
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ Protocol 2
|
||||
#HostKey /etc/ssh/ssh_host_key
|
||||
# HostKeys for protocol version 2
|
||||
#HostKey /etc/ssh/ssh_host_rsa_key
|
||||
#HostKey /etc/ssh/ssh_host_dsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@ do_install_append () {
|
||||
install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
|
||||
|
||||
|
||||
Reference in New Issue
Block a user