How can I disable DSA and ECDSA authentication on my server with OpenSSH 5.9? Sifting through the documentation material and doing a web search didn't yield any results - only an old bug report for the Debian package here (and those linked at the bottom of that bug) but no conclusion.
Assuming it is not possible to disable those two methods from inside the /etc/ssh/sshd_config
, is it enough to do (Bash syntax): for i in /etc/ssh/ssh_host_{ecdsa,dsa}_key*; do echo -n ""|sudo tee "$i"; sudo chattr +i "$i"; done
(below with line breaks for readability):
for i in /etc/ssh/ssh_host_{ecdsa,dsa}_key*;
do
echo -n ""|sudo tee "$i"
sudo chattr +i "$i"
done
I.e. to invalidate the host keys and then make them immutable, thus rendering attempts from sshd
to regenerate the DSA and ECDSA host keys impossible.
The reason I want to disable DSA is because there are sources that claim weaknesses in the algorithm that have been actively abused, such as Wikipedia and this website. I dug a bit further and it seems credible. The more pragmatic and less theoretical advantage is the verification speed of RSA over DSA.
TL;DR: is it possible to configure sshd
from OpenSSH in sshd_config
to disable ECDSA and DSA? If not, can one prevent successful authentications with those methods by setting the host key files immutable?