问题原文
原帖链接 · Sparr · CC BY-SA 3.0
My ~/.ssh/config contains this:
HostKeyAlgorithms +ssh-dss
I copy this configuration across many systems. Recently I copied it to a system running OpenSSH v5.3 and that entry is now an error:
/home/sparr/.ssh/config line 3: Bad protocol 2 host key algorithms '+ssh-dss'.
Is there a way to make this configuration backwards compatible, so that the new option is used for newer clients and ignored for older clients?
已采纳解答
原帖链接 · Jakuje · CC BY-SA 3.0
The old OpenSSH does not support the + sign. But you can write it the way you list all of the algoriths (that are common for these versions):
HostKeyAlgorithms [email omitted],[email omitted],[email omitted],[email omitted],[email omitted],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa,ssh-dss
Or just really update your server and do not use DSA host keys, since they are insecure.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
