内容简介:使用 Mac 自带终端 SSH 连接服务器时,只要隔一小段时间不进行操作的话连接就会自动中断,造成了不好的体验。解决方法如下:1、连接到你的服务器2、编辑服务端配置文件 /etc/ssh/sshd_config
使用 Mac 自带终端 SSH 连接服务器时,只要隔一小段时间不进行操作的话连接就会自动中断,造成了不好的体验。解决方法如下:
1、连接到你的服务器
2、编辑服务端配置文件 /etc/ssh/sshd_config
vim /etc/ssh/sshd_config
添加以下两行配置代码
ClientAliveInterval 30 ClientAliveCountMax 3
3、编辑客户端配置文件 /etc/ssh/ssh_config
vim /etc/ssh/ssh_config
在 Host * 下面添加以下两行配置代码
ServerAliveInterval 30 ServerAliveCountMax 3
4、断开SSH连接
Ctrl + d
5、SSH 重连服务然后执行重启
sync 将数据由内存同步到硬盘中。 reboot 就是重启
重启后可能需要等待1分钟左右才能重新连接上。
最后验证测试就可以了。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 如何使用 RST 来解决 TCP 断开问题
- PostgreSQL复制断开故障
- librdkafka 打印连接断开错误
- 俄罗斯成功断开互联网
- SWOOLE开发实时聊天系统(十)用户断开聊天
- c# – 以编程方式连接和断开USB设备
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Chinese Authoritarianism in the Information Age
Routledge / 2018-2-13 / GBP 115.00
This book examines information and public opinion control by the authoritarian state in response to popular access to information and upgraded political communication channels among the citizens in co......一起来看看 《Chinese Authoritarianism in the Information Age》 这本书的介绍吧!