若没有开放,则新增入栈规则,若已开放,则进行下一步
因为无法通过其他方式连接linux,只能使用 VNC 登录 Linux 实例
登录成功后 查看是否含有 sshd 服务监听的端口。
netstat -tnlp | grep sshd
执行后,若无输出,则可能是 sshd 服务未启动。执行以下命令,查看 sshd 服务是否启动。
systemctl status sshd.service
如果未启动,请执行以下命令,启动 sshd 服务,再重新使用 SSH 登录 Linux 实例。
systemctl start sshd
若无法正常启动,则进行下一步
提示这个错误,则先使用如下命令定位错误信息
sshd -t
错误信息为:/var/empty/sshd must be owned by root and not group or world-writable
权限问题,执行如下命令:
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart
xshell连接linux报Disconnected from remote host/WebShell连接报SSH connection failed: connect ECONNREFUSED
原文:https://www.cnblogs.com/sylvia-/p/13219897.html