Solution to idle disconnection due to ssh connection timeout

Source: Internet
Author: User
Tags ssh server
How can I avoid idle ssh connection due to timeout? During SSH connection, the server is often kicked out without operation for a long time. the common prompt is Writefailed: Brokenpipe. if there are countless SSH connections for a while... how can I avoid idle ssh connection due to timeout? During SSH connection, the server is often kicked out after a long period of time without operation. common tips: Write failed: broken pipe this is because if there is no data transmission on the SSH connection for a period of time, the connection will be disconnected. There are two ways to solve this problem. Solution 1: The setting method on the client is very simple. you only need to edit (root permission required)/etc/ssh/ssh_config on the client computer and add the following line: serverAliveInterval 60 and later, when a user in the system connects to SSH, a KeepAlive request is sent every 60 seconds to avoid being kicked. Solution 2: If you have the required permissions on the server, you can also set them on the linux server, that is, edit/etc/ssh/sshd_config and add: clientAliveInterval 60 after the SSH server is restarted, this setting takes effect. Each client connected to this server is affected. It should be noted that after this function is enabled, security will decrease.
Related Article

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.