在ssh_config
我有HostKeyAlgorithms
参数,我可以强制使用DSSalgorithm的密钥,如:
HostKeyAlgorithms "ssh-dss"
我如何在sshd_config
(守护进程configuration)中执行此操作,以强制所有连接传入应使用ssh-dss而不是ssh-rsa?
去掉
HostKey / etc / ssh / ssh_host_rsa_key
从sshd_config。
我必须注意,使用1024位密钥与RSA或DSA不再被认为是安全的,标准DSA将密钥大小限制为1024位(尽pipeOpenSSH可以产生高达2048位的DSA密钥)
“OpenSSH 7.0和更高版本同样禁用了ssh-dss(DSA)公钥algorithm,它也很弱,我们build议不要使用它。
来源: https : //www.openssh.com/legacy.html