How to set the timeout for the SSH service terminal or not time out

Source: Internet
Author: User
Tags ssh server

SSH is currently the safest way to replace Telnet, but in the process of using SSH to connect to the server, often encounter a long time without the operation of the server kicked out of the situation, the common tips are as follows:

Write Failed:broken Pipe

Usually this kind of problem is when we use Linux as a client, we encounter a little more, party server is Linux, and client is windows, and we commonly used software for Xshell, Xshell will automatically renew for us,

There are a number of ways to solve this problem, and here are two solutions for both client and server:

One, Cilent: Edit the/etc/ssh/sshd_config file, add the following line:

Serveraliveinterval 60

Since then, when the user SSH connection in the system, every 60 seconds will issue a keepalive request, tell the server I still do not kick me.

Second, the server: Edit the/etc/ssh/sshd_config file, add the following line:

Clientaliveinterval 60

function as above, restart the SSH server is in effect, and every SSH client connected to the server will be affected by this, it should be noted that this operation will reduce the security of the server.

This article from "A cup of boiled water" blog, please be sure to keep this source http://ultraera.blog.51cto.com/6640392/1671316

How to set the timeout for the SSH service terminal or not time out

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.