2.11.1.1.5. Broken pipes on macOS
If at connecting to hosting via SSH across macOS terminal the connection is terminated after some time of inactivity, do the following:
- Open the SSH configuration file for editing by running the command:
sudo nano /etc/ssh/ssh_config
- When prompted for a password, enter the device administrator password (no characters will be displayed on the screen when entering the password) and press Enter.
- At the bottom of the config file after
Host *
add the following lines:ServerAliveInterval 120 TCPKeepAlive no
- Save changes with the combination ⌘+O.
- Close the editor with a shortcut ⌘+X.
- Check for a problem.
Parameter ServerAliveInterval
is responsible for how often (in seconds) your PC will send a zero packet to keep the connection active. If the problem persists, try lowering the value, for example to 5
... If this does not work, then it is possible that the problem is in the router used.