A PCRE internal error occured. This might be caused by a faulty plugin
====== Differences ====== This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
tricks:keep-ssh-alive [2013/12/17 14:36] admin |
tricks:keep-ssh-alive [2015/08/02 02:42] (current) admin [Choose Your Level] |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| ==== Choose Your Level ==== | ==== Choose Your Level ==== | ||
| - | The solution to avoid this is to have your ssh session sending a "ServerAlive" signal on a regular basis. Telling the remote system you're still there. | + | The solution to avoid this is to have your ssh session sending a "ServerAlive" signal on a regular basis, telling the remote system you're still there. |
| - | The timeout between signal send can be modified at three different levels: | + | |
| + | The timeout between signals sent can be controled with the ServerAliveInterval parameter, it can be set at three different levels: | ||
| * Global level: will affect all ssh sessions made from your system | * Global level: will affect all ssh sessions made from your system | ||
| * User level: will affect all ssh sessions initiated by a specific user | * User level: will affect all ssh sessions initiated by a specific user | ||
| * Host level: will a specific ssh session timeout per host, for a specific user | * Host level: will a specific ssh session timeout per host, for a specific user | ||
| - | To modify the **global** session timeout on your system, edit the /etc/ss/ssh_config file: | + | |
| + | === Global === | ||
| + | To modify the **global** session timeout on your system, edit the /etc/ssh_config file: | ||
| <code> | <code> | ||
| sudo nano /etc/ssh/ssh_config | sudo nano /etc/ssh/ssh_config | ||
| Line 25: | Line 28: | ||
| <code> | <code> | ||
| ServerAliveInterval 60 | ServerAliveInterval 60 | ||
| - | </code> | + | </code> |
| + | |||
| + | === Per User === | ||
| + | To modify a **user**'s session timeout, edit the /home/<username>/.ssh/config file | ||
| + | <code> | ||
| + | [sudo] nano /home/<username>/.ssh/config | ||
| + | </code> | ||
| + | |||
| + | Add this line (or modify the existing one if any): | ||
| + | <code> | ||
| + | Host * | ||
| + | ServerAliveInterval 60 | ||
| + | </code> | ||
| + | Please note that the second line is indented with a space! | ||
| + | |||
| + | === Per Host === | ||
| + | You could determine **per host** intervals by specifying their name in /home/<username>/.ssh/config : | ||
| + | <code> | ||
| + | Host *hostname.tld | ||
| + | ServerAliveInterval 60 | ||
| + | </code> | ||
