背景
使用jcraft连接OpenEuler机器出现上述异常
解决方案
- 修改ssh server的服务配置
- 具体步骤如下
打开/etc/ssh/sshd_config文件,在HostKeyAlgorithms和PubkeyAcceptedKeyTypes配置项增加ssh-rsa
# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.20230427
# grep -vE '^#|^$' /etc/ssh/sshd_config
# vi /etc/ssh/sshd_config
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512
PubkeyAcceptedKeyTypes ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512
在HostKeyAlgorithms和PubkeyAcceptedKeyTypes配置项增加ssh-rsa
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa
PubkeyAcceptedKeyTypes ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa
# systemctl restart sshd
# systemctl status sshd
参考
- https://forum.openeuler.org/t/topic/2665/5
本文介绍了如何在OpenEuler系统中,通过修改sshd_config文件中的HostKeyAlgorithms和PubkeyAcceptedKeyTypes配置,解决使用jcraft连接时遇到的SSH异常问题,涉及添加ssh-rsa算法。
1954

被折叠的 条评论
为什么被折叠?



