习惯了xshell5 远程登录 CentOS7 debian 10,但 debian 11出来,

可能openssh因为安全问题,很多系统在升级了openssh后出现错误;
错误:找不到匹配的keyexchange算法;
解决办法:在服务器端配置文件:/etc/ssh/sshd_config,添加一行。

KexAlgorithms +diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1

 debian 11 还需修改 sshd_chonfig 配置

# 端口号
#Port 22
Port 2202

#允许管理员登录(默认禁止)
#PermitRootLogin prohibit-password
PermitRootLogin yes

#登录需要使用密码(默认没有该配置)
PasswordAuthentication yes

保存 systemctl restart ssh 即可。

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐