paulwong

          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 remotehost.com     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 閱讀(310) 評論(0)  編輯  收藏 所屬分類: LINUX

          主站蜘蛛池模板: 泽库县| 资溪县| 岳西县| 宁海县| 大余县| 阿合奇县| 雷波县| 藁城市| 乐山市| 喀喇沁旗| 化州市| 军事| 根河市| 九江县| 江陵县| 都昌县| 兰考县| 新邵县| 泰和县| 方正县| 南通市| 钦州市| 兴业县| 洪湖市| 穆棱市| 鲜城| 冕宁县| 芦溪县| 南皮县| 盐亭县| 闽侯县| 镇沅| 荔波县| 吴江市| 贺州市| 敦煌市| 京山县| 永仁县| 轮台县| 花莲市| 肇东市|