我在Mac上使用iTerm2来做Linux的工作。为了避免失去终端连接,我打开了“空闲时,发送Ascii代码”。缺省值为0。这就像一种保持联系的魅力,但是有一个严重的问题。
结果是将^@发送到终端,这在大多数情况下都是可以的,但是在vi
中它将插入最近输入的文本。
我能寄什么那是安全的?
发布于 2013-10-19 19:34:04
您能不能不使用此ssh
选项来防止连接断开?
在您的~/..ssh/config文件中尝试此选项:
ServerAliveInterval=15
man ssh_config
摘录
ServerAliveInterval
Sets a timeout interval in seconds after which if no data has been
received from the server, ssh(1) will send a message through the encrypted
channel to request a response from the server. The default is 0,
indicating that these messages will not be sent to the server. This
option applies to protocol version 2 only.
您可以从命令行临时使用此切换到ssh
执行此操作:
$ ssh -o ServerAliveInterval=15 keepsdroppingme.com
目录~/.ssh/
的权限可能有点麻烦,如果需要任何其他指导,请参阅本文:防止SSH连接冻结。
https://unix.stackexchange.com/questions/96784
复制相似问题