Greetings and good morning.
I have a DROPLET under CentOS 8 and it is working very well. So far I have been able to install Apache and PHP, but I have a bug with SSH. When I connect through SSH it does well, but after a few seconds it automatically disconnects which forces me to connect again. This happens to me with several SSH clients and I have tried it from different computers and the error is always the same: it disconnects automatically after several seconds.
I ask for the necessary support to be able to solve this problem. Thank you very much,
Edward Ocando
Edward.Ocando@gmail.com
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!
Hi @edwardocando,
The standard workaround for this sort of problem is to make sure the router never thinks your connection is idle; send “fake traffic” at regular intervals. In computer jargon this is called “keep alive” traffic; we’re sending it just to keep the connection alive.
MacOS/Linux
In your $HOME/.ssh/config file you can turn on KeepAlive with the following commands:
Host *
ServerAliveInterval 600
This tells the ssh client that if it hasn’t received a message from the server within 600 seconds then send a NOOP message to it, to get a response. This works pretty well at making the router think the connection is still busy and so don’t drop it as idle. Nicely this packet is only sent if you are idle, so it doesn’t cause any extra traffic on active sessions.
Windows, using putty
It’s the one I use when forced to use windows! It also has the ability to send keepalives, which can be found on the Connection section of the connection menu. You can enter a timeout there, and save it as part of your connection profile.
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.