Centos-XShell连接centos出现10053错误最简单的解决方法
使用xshell连接虚拟机中新安装的centos出现问题错误提示说明连接被主机关闭,解决问题先要确定原因,先到虚拟机中看看原因使用命令systemctl status sshd 查看一下ssh服务运行状态,确定错误原因没有相关密匙文件。#systemctl status sshd● sshd.service - OpenSSH server daemonLoaded: loaded (/usr/l
·
使用xshell连接虚拟机中新安装的centos出现问题
错误提示说明连接被主机关闭,解决问题先要确定原因,先到虚拟机中看看原因使用命令
systemctl status sshd 查看一下ssh服务运行状态,确定错误原因没有相关密匙文件。
#systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-12-04 14:12:34 CST; 1min 37s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 43493 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 43496 (sshd)
CGroup: /system.slice/sshd.service
└─43496 /usr/sbin/sshd
Dec 04 14:14:02 localhost.localdomain sshd[43535]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Dec 04 14:14:02 localhost.localdomain sshd[43535]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Dec 04 14:14:02 localhost.localdomain sshd[43535]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Dec 04 14:14:02 localhost.localdomain sshd[43535]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Dec 04 14:14:02 localhost.localdomain sshd[43535]: fatal: No supported key exchange algorithms [preauth]
Dec 04 14:14:08 localhost.localdomain sshd[43545]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Dec 04 14:14:08 localhost.localdomain sshd[43545]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Dec 04 14:14:08 localhost.localdomain sshd[43545]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Dec 04 14:14:08 localhost.localdomain sshd[43545]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Dec 04 14:14:08 localhost.localdomain sshd[43545]: fatal: No supported key exchange algorithms [preauth]
经过查询资料了解到此密匙文件可以使用手动生成,但本人对ssh并不十分了解决定不使用此方法。
既然系统原带的ssh服务有问题,那么就重新安装ssh
重装ssh服务
1、卸载yum remove openssh*
2、安装yum install openssh-server
3、查看是否安装成功rpm -qa openssh*
4、启动服务systemctl start sshd
5、设置开机自自动systemctl enable sshd
6、查看状态 systemctl status sshd,发现已经没有相关错误
7、使用Xshell重新连接连接成功
更多推荐
已为社区贡献1条内容
所有评论(0)