ssh客户端会话
SSH is a very common tool for Linux/Unix platforms. One annoying problem when using SSH is that the connection may get disconnected if the SSH connection is idle for some time under common configurations. Users may run an infinite loop like while true; do uptime; sleep 30; done
when there is no work to be done in a SSH session. There are better ways as SSH servers and clients already provide such support and we will discuss these methods in this post.
SSH是Linux / Unix平台上非常常用的工具。 使用SSH时的一个烦人的问题是,如果在常规配置下SSH连接空闲一段时间,则连接可能会断开连接。 用户可能会像while true; do uptime; sleep 30; done
那样运行无限循环while true; do uptime; sleep 30; done
while true; do uptime; sleep 30; done
while true; do uptime; sleep 30; done
的时候没有一个SSH会话工作要做。 有更好的方法,因为SSH服务器和客户端已经提供了这种支持,我们将在本文中讨论这些方法。