xshell远程连接自动断开的问题解决办法
故事写在心里-:
我 是自己的服务器 我每次要用 都需要重启网卡,我想让xshell 下次链接直接连 怎么弄呢??
出现Destination Unreachable的解决办法
KieMg:
我遇到这个情况(Destination unreachable, code 10)是因为数据包被防火墙扔掉了,针对防火墙做了一些处理就能跑通了。
[code=plain]
$ sudo systemctl stop firewalld.service
$ sudo systemctl disable firewalld.service
[/code]
直接关闭防火墙,这样比较简单粗暴,或者新增开放端口也可以解决。
[code=plain]
// 查看指定端口开放状态(如8020,打印no即为不开放)
# firewall-cmd --query-port=8020/tcp
// 查看防火墙开放端口状态
# firewall-cmd --list-ports
// 重载防火墙(reload)
# firewall-cmd --reload
// 临时开放端口(如端口999,无需reload,reload后端口恢复关闭状态)
# firewall-cmd --add-port=999/tcp
// 永久增加开放端口(如端口999,需reload后生效)
# firewall-cmd --permanent --add-port=999/tcp
// 临时删除端口(reload后消失)
# firewall-cmd --remove-port=999/tcp
// 永久删除端口(reload后生效)
# firewall-cmd --permanent --remove-port=999/tcp
// 添加允许访问的ip(需reload)
# firewall-cmd --zone=public --add-rich-rule 'rule family="ipv4" source address="10.45.2.35" accept' --permanent
[/code]
解决方案来源:
[code=plain]
https://www.cnblogs.com/gaowengang/p/14681864.html
https://blog.csdn.net/weixin_44256848/article/details/121094904
[/code]
xshell远程连接自动断开的问题解决办法
koutaiqing2695:
服务器在/etc/profile里面配置了TIMAOUT变量,在这个时间内你没有活动输入自动把你踢了,你客户配置有毛用。
E558: Terminal entry not found in terminfo
Peter_J:
原因是什么呢?
xshell远程连接自动断开的问题解决办法
如果猪会飞:
博主你好,我用你的方法试了一下,自动断开,请问还有什么解决办法吗?