首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >空闲终端安全字符

空闲终端安全字符
EN

Unix & Linux用户
提问于 2013-10-19 19:16:52
回答 1查看 2.9K关注 0票数 7

我在Mac上使用iTerm2来做Linux的工作。为了避免失去终端连接,我打开了“空闲时,发送Ascii代码”。缺省值为0。这就像一种保持联系的魅力,但是有一个严重的问题。

结果是将^@发送到终端,这在大多数情况下都是可以的,但是在vi中它将插入最近输入的文本。

我能寄什么那是安全的?

EN

回答 1

Unix & Linux用户

发布于 2013-10-19 19:34:04

您能不能不使用此ssh选项来防止连接断开?

在您的~/..ssh/config文件中尝试此选项:

代码语言:javascript
运行
复制
ServerAliveInterval=15

man ssh_config摘录

代码语言:javascript
运行
复制
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执行此操作:

代码语言:javascript
运行
复制
$ ssh -o ServerAliveInterval=15 keepsdroppingme.com

目录~/.ssh/的权限可能有点麻烦,如果需要任何其他指导,请参阅本文:防止SSH连接冻结

票数 9
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/96784

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档