千家信息网

centos8 openssh怎样开启dsa

发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,centos8 openssh怎样开启dsa,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。update 2019-12-19最近测试发现
千家信息网最后更新 2025年12月02日centos8 openssh怎样开启dsa

centos8 openssh怎样开启dsa,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

update 2019-12-19

最近测试发现,重启centos8 的时候,发现opensshserver.config会重置,导致之前加的dss配置失效,还是会让人无法登陆。现在更新新的配置方式

修改 /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 lineCRYPTO_POLICY=

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

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

这样更古老的key,也可以登陆服务器

为了安全,当然不推荐这么做。

-------------------------------------正文分割线----------------------------------------------------------------------

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

PubkeyAcceptedKeyTypes=+ssh-dss

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

ssh-dss'

3. 重启ssh服务

systemctl restart sshd`

看完上述内容,你们掌握centos8 openssh怎样开启dsa的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注行业资讯频道,感谢各位的阅读!

0