centos8 openssh 開啓dsa

update 2019-12-19

最近測試發現,重啓centos8 的時候,發現opensshserver.config會重置,致使以前加的dss配置失效,仍是會讓人沒法登錄。如今更新新的配置方式centos

修改 /etc/sysconfig/sshd,打開註釋

[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=

修改/etc/ssh/sshd_config,添加cipher

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
PubkeyAcceptedKeyTypes=+ssh-dss

這樣更古老的key,也能夠登錄服務器安全

爲了安全,固然不推薦這麼作。服務器

-------------------------------------正文分割線----------------------------------------------------------------------ssh

1. 修改/etc/ssh/sshd_config,配置文件末尾添加

PubkeyAcceptedKeyTypes=+ssh-dss

2. 修改/etc/crypto-policies/back-ends/opensshserver.config,配置文件末尾添加

ssh-dss'

3. 重啓ssh服務

systemctl restart sshd`
相關文章
相關標籤/搜索