How to keep the SSH connection to the Linux server continuously line

Source: Internet
Author: User

Windows system

Using SECURECRT to connect to a remote server, check "send Protocol No-op" in the terminal settings, session options.

Using putty to connect to the remote server, locate connection-Seconds between keepalives (0 to turn off), default is 0, and change to 60.

Linux Systems

When using SSH to connect a remote server to a Linux system, you can use one of the parameter serveraliveinterval of-O to set the time to prevent timeouts.

For example: Ssh-o serveraliveinterval=60 username@host

Server Configuration Modifications

Modify the SSH configuration file/etc/ssh/sshd_config, add or modify Clientaliveinterval to "Clientaliveinterval 60". This parameter means that every 1 minutes, the server sends a message to the client to keep the connection. Remember to restart the SSH service after saving.

After the modification, the above several methods can let SSH stay connected, always in the alive state, not because there is no operation to be forced by the server disconnected.


How to keep the SSH connection to the Linux server continuously line

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.