最近測試發現,重啓centos8 的時候,發現opensshserver.config會重置,致使以前加的dss配置失效,仍是會讓人沒法登錄。如今更新新的配置方式centos
[root@kvm-centos8 ~]# more /etc/sysconfig/sshd #Configuration file for the sshd service. #The server keys are automatically generated if they are missing. #To change the automatic creation, adjust sshd.service options for #example using systemctl enable sshd-keygen@dsa.service to allow creation #of DSA key or systemctl mask sshd-keygen@rsa.service to disable RSA key #creation. #System-wide crypto policy: #To opt-out, uncomment the following line CRYPTO_POLICY=
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc PubkeyAcceptedKeyTypes=+ssh-dss
這樣更古老的key,也能夠登錄服務器安全
爲了安全,固然不推薦這麼作。服務器
-------------------------------------正文分割線----------------------------------------------------------------------ssh
PubkeyAcceptedKeyTypes=+ssh-dss
ssh-dss'
systemctl restart sshd`