macOS的终端连接远程,如果超过一定时间不操作,就会被断开连接。
可以使用如下方法解决这个问题。
修改配置 /etc/ssh/ssh_config
加入
# sudo vi /etc/ssh/ssh_config
ServerAliveInterval 20
ServerAliveCountMax 20
退出所有终端,重新打开,再登录远程shell,就不会再自动退出了。
macOS的终端连接远程,如果超过一定时间不操作,就会被断开连接。
可以使用如下方法解决这个问题。
修改配置 /etc/ssh/ssh_config
加入
# sudo vi /etc/ssh/ssh_config
ServerAliveInterval 20
ServerAliveCountMax 20
退出所有终端,重新打开,再登录远程shell,就不会再自动退出了。