By Andrew Fox
Whenever I’m connected to my droplet through SSH and stop using it for a few minutes, it drops offline and I get the message “broken pipe”. It doesn’t seem to be associated with any sort of time limit, but more to do with how much time there is between activity. For example, I am often going between the terminal and the #Laravel chat room for help, but if I’m gone for too long it’s disconnected when I get back. Is there anything I can do to avoid this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
https://stackoverflow.com/a/37330274
You can set keep alive in the command line: ssh -o ServerAliveInterval=30 <your-server>
or set it in the ssh server config: /etc/ssh/sshd_config ClientAliveInterval 60 ClientAliveCountMax 2
Thank you. I just tried your idea and it still disconnects. I restarted nginx but it didn’t seem to make a difference :(
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.