美文网首页
Linux远程连接超时断开

Linux远程连接超时断开

作者: 李得志_春风得意马蹄疾 | 来源:发表于2019-10-28 16:55 被阅读0次

通过客户端远程登录Linux,在一段时间没有操作后,连接将被断开,已经进入了目录和执行命令的记录将丢失。

以下方法可以延长连接的时间。

/etc/ssh/sshd_config中ClientAliveInterval默认被注释。将ClientAliveInterval的值设置为300秒。
...
vim /etc/ssh/sshd_config
ClientAliveInterval 300
...

重载sshd服务
systemctl reload sshd.service

ClientAliveInterval的意义
man sshd
man 5 sshd_config
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) will send a message through the encrypted(加密) channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client. This option applies to protocol(协议) version 2 only.

相关文章

  • Linux远程连接超时断开

    通过客户端远程登录Linux,在一段时间没有操作后,连接将被断开,已经进入了目录和执行命令的记录将丢失。 以下方法...

  • SSH 保持连接

    参考:iTerm2中ssh保持连接不断开参考:Linux使用ssh超时断开连接的真正原因参考:SSH 保持连接 (...

  • screen的简单使用

    当使用使用Xshell远程连接Linux系统时,当想要启动多个服务并且断开Xshell连接时服务继续运行,可以使用...

  • linux常见命令

    一、使用过的linux命令记录 二、linux连接超时解决方案 1、先测试网络是否连得通。 ping 远程I...

  • CentOS设置闲置账号超时时间

    通过远程登陆SSH服务器,闲置一定时间自动断开连接 临时生效:export TMOUT=10 #10秒钟后会超时断...

  • 阿里云部署node

    阿里云远程连接密码:995224 linux部分 连接linux:在terminal中,shell -> 新建远程...

  • Linux下tcp连接断开后,端口释放问题

    Linux系统下,TCP/IP连接断开 如果客户端先断开连接,server端再断开,那么server端占用的端口号...

  • Linux远程连接服务器

    远程连接Linux云服务器-命令行模式 远程连接工具。 目前Linux远程连接工具有很多种,您可以选择顺手的工具使...

  • Linux服务器后台继续执行程序tmux方法

    通常本地连接远程linux服务器以后我们需要服务器一直执行程序,即使我们本地电脑关机或者断开连接,此时我们需要用到...

  • Linux使用ssh超时断开连接的真正原因

    最近使用 ssh 连接服务器的时候,经常一段时间没有操作就断开了(即无法正常操作,键盘输入无反应),一直以为这是服...

网友评论

      本文标题:Linux远程连接超时断开

      本文链接:https://www.haomeiwen.com/subject/ijkbuctx.html