
Get rid of “Write Failed: broken pipe” on SSH connection
Sometimes you will need to run a long process within an ssh session, and you cannot do that regarding the “Write Failed: broken pipe” error, when you are pushed out.
You have two ways to get rid of that:
- Set a ServerAliveInterval:
Sets a timeout interval in seconds after which if no data has been received from the server, ssh
will send a message through the encrypted channel to request a response from the server, so you won’t be pushed out.
1 |
echo “ServerAliveInterval 120” >> ~/.ssh/config |
- Daemonize the process:
1 |
nohup <command> & |
nohup creates a daemon and detach the process completely from the terminal.