openssh 8怎样开启dsa
update 2019-12-19
最近测试发现,重启centos8 的时候,发现opensshserver.config会重置,导致之前加的dss配置失效,还是会让人无法
登陆。现在更新新的配置方式
修改 /etc/sysconfig/sshd,打开注释
1
[root@kvm-centos8 ~]# more /etc/sysconfig/sshd
2 #Configuration file for the sshd service.
3
4 #The server keys are automatically generated if they are missing.
5 #To change the automatic creation, adjust sshd.service options for
6 #example using systemctl enable sshd-keygen@dsa.service to allow creation
7 #of DSA key or systemctl mask sshd-keygen@rsa.service to disable RSA key
8 #creation.
9
10 #System-wide crypto policy:
11 #To opt-out, uncomment the following line
12 CRYPTO_POLICY=
修改/etc/ssh/sshd_config,添加cipher
1
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
2 PubkeyAcceptedKeyTypes=+ssh-dss
这样更古老的key,也可以登陆
服务器
为了安全,当然不推荐这么做。
————————————-正文分割线———————————————————————-
\1. 修改/etc/ssh/sshd_config,配置文件末尾添加
1
PubkeyAcceptedKeyTypes=+ssh-dss
\2. 修改/etc/crypto-policies/back-ends/opensshserver.config,配置文件
末尾添加
1
ssh-dss
\3. 重启ssh服务
1
systemctl restart sshd
看完上述内容,你们掌握centos8 openssh怎样开启dsa的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢
迎关注亿速云行业资讯频道,感谢各位的阅读!