This post primarily gives a full tutorial on how to make SSH PuTTY keep alive. If you want to make PuTTY SSH connection never to timeout when user is idle, keep reading!
Hello. I have a server I bought, if I connect with PuTTY using SSH and one user PuTTY gets disconnected by the server after some time if I am idle. How do I configure my server and how to keep PuTTY session alive indefinitely?”
- Question from Reddit
The PuTTY application is used by Microsoft Windows operating systems to establish SSH connections. You can change PuTTY's settings to assist maintain connections if you have trouble connecting. See how to make SSH PuTTY keep alive on Windows by following these instructions.
Step 1. Start PuTTY and load your connection session.
Step 2. In the Category pane, click Connection. Find Seconds between keepalives, type 30 in the box.
Step 3. In the Category pane, click Session, and then click Save.
Step 4. Connect to your account and monitor the connection, to see if the problem got fixed.
If you are using Linux or macOS and wish to keep SSH connections alive, the /.ssh/config file allows you to define numerous SSH parameters, including those that keep an SSH connection alive.
Step 1. Use your preferred text editor to open the ~/.ssh/config file on your local computer. If the .ssh directory or the config file do not exist, create it.
On Linux, you can hit CTRL + ALT + T or go to the apps menu and search for “terminal” to open the Terminal.
On macOS, you can go to Finder > Applications > Utilities > Terminal to open a terminal window.
Step 2. Insert the following lines into the configuration file. The Host value can be given any name; it is essentially a label for the other parameters. The remote host you wish to connect to is specified by the Hostname parameter; replace "example.com" with your domain name. Replace "username" with the username from your A2 Hosting account:
Host example
Hostname example.com
Port 7822
User username
ServerAliveInterval 30
ServerAliveCountMax 2
Step 3. Save the changes to the config file, and then connect to your account using ssh username@ssh.server.com command.
Another way to remote into a computer is to use the free remote desktop software AnyViewer, which offers you continuous and persistent remote connections. Besides, it has the following advantages:
✍ Advantages ▪ Quick installation. ▪ Fast connection speed. ▪ One-click for unattended remote access. ▪ Text chat available in the remote session. ▪ File transfer support. ▪ Shortcuts of essential apps like Task Manager. ▪ Support controlling multiple computers at the same time. ▪ Mobile support is for both iOS and Android devices.
Now, download the free remote access software - AnyViewr, and walk through how it works.
Step 1. Install and launch AnyViewer on both computers. Go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)
Step 2. Fill in the signup information and click Sign up to create an AnyViewer account.
Step 3. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you've logged in to.
Step 4. Log in to the same AnyViewer account on the two computers. Then you can achieve a one-click connection by clicking One-click control after going to Device and clicking the computer that you want to access.
This post primarily introduces how to make SSH PuTTY keep alive on Windows. As a bonus tip, it also introduces how to keep SSH connections alive on Linux and macOS operating systems. But if you want stable and continuous remote connections, it is highly recommended to use AnyViewer.