Keep SSH session alive

sshd (the server) closes the connection if it doesn't hear anything from the client for a while. You can tell your client to send a sign-of-life signal to the server once in a while.

The configuration for this is in the file "~/.ssh/config", create it if the configuration file does not exist. To send the signal every four minutes (240 seconds) to the remote host, put the following in your "~/.ssh/config" file.

Host remotehost:     HostName     ServerAliveInterval 240 

This is what I have in my "~/.ssh/config":

To enable it for all hosts use:

Host * ServerAliveInterval 240 

Also make sure to run:

chmod 600 ~/.ssh/config 

because the config file must not be world-readable.

posted on 2019-07-30 13:46 paulwong 閱讀(57) 評論(0)  編輯  收藏 所屬分類: LINUX


2013火热网络捕鱼游戏 彩票软件编程 手机516棋牌游戏中心 贵州快三开奖结果查询 浙江十一选五开奖结果 体育彩票半全场什么意思 吉林十一选五 支付宝怎么赚钱到卡免费 福建36选7开奖走势图 贵州11选5前三直选 码报资料图片 辽宁十一选五 王者荣耀s15 快乐10分定胆 彩票天天乐是黑平台吗 英超联赛利物浦对切尔西 福建快3