j****c 发帖数: 19908 | 1 在家ssh到办公室的服务器干活,如果十几分钟不输入命令过去,ssh就会自动断开。请
问在哪里设置ssh可以解决这个问题?
是设置家里的机器,还是办公室的服务器? |
w****r 发帖数: 1384 | 2 客户端看看有没有什么地方可以设置自动发个无效命令过去保持连接的看看.
【在 j****c 的大作中提到】 : 在家ssh到办公室的服务器干活,如果十几分钟不输入命令过去,ssh就会自动断开。请 : 问在哪里设置ssh可以解决这个问题? : 是设置家里的机器,还是办公室的服务器?
|
j****c 发帖数: 19908 | 3 我就是想知道在什么地方可以更改设置呢,呵呵
只找到 ~/.ssh/下面有一个known_host文件
【在 w****r 的大作中提到】 : 客户端看看有没有什么地方可以设置自动发个无效命令过去保持连接的看看.
|
a*******e 发帖数: 3021 | 4 1st, to be able to keep alive ur ssh session properly, server side need to
support it.
when i say properly, i mean no tricks or bypassing, just simple ssh config.
if server side doesn't support, u can't do much at client side.
2nd, try some tricks like using screen, or maybe using cterm to send trial
bits...
【在 j****c 的大作中提到】 : 在家ssh到办公室的服务器干活,如果十几分钟不输入命令过去,ssh就会自动断开。请 : 问在哪里设置ssh可以解决这个问题? : 是设置家里的机器,还是办公室的服务器?
|
h*******c 发帖数: 248 | 5 just some detail:
At client side create a file .ssh/config, if you don't have, and add the
following line in it:
ServerAliveInterval 60
you may also need to change the permission of that file.
【在 a*******e 的大作中提到】 : 1st, to be able to keep alive ur ssh session properly, server side need to : support it. : when i say properly, i mean no tricks or bypassing, just simple ssh config. : if server side doesn't support, u can't do much at client side. : 2nd, try some tricks like using screen, or maybe using cterm to send trial : bits...
|
j*a 发帖数: 14423 | 6 grep -i tcp /etc/ssh/sshd_config
TCPKeepAlive yes
【在 j****c 的大作中提到】 : 在家ssh到办公室的服务器干活,如果十几分钟不输入命令过去,ssh就会自动断开。请 : 问在哪里设置ssh可以解决这个问题? : 是设置家里的机器,还是办公室的服务器?
|
f**y 发帖数: 138 | 7 Actually set TCPKeepAlive to yes will cause your session to be disconnected
more easily.
Start your session with an additional tunnel forwarding on a port with
frequent traffic will keep your session alive. |
l********g 发帖数: 134 | 8 my trick: start xload if u enable X11
disconnected
【在 f**y 的大作中提到】 : Actually set TCPKeepAlive to yes will cause your session to be disconnected : more easily. : Start your session with an additional tunnel forwarding on a port with : frequent traffic will keep your session alive.
|