Home > System Tutorial > LINUX > body text

Centos 7 SSH connection timeout automatic disconnection solution

WBOY
Release: 2024-08-10 10:44:05
Original
532 people have browsed it

Centos 7 SSH连接超时自动断开解决方案

Recently, I was installing software on Centos 7, and it automatically disconnected after a while without looking at it. I didn’t know the progress of the software installation. I was so angry that I directly changed the sshd_config file, and I felt much better instantly.

1. Edit sshd configuration file

    # vi /etc/ssh/sshd_config

    找到

    #ClientAliveInterval 0
    #ClientAliveCountMax 3

    修改为

    ClientAliveInterval 60
    ClientAliveCountMax 3
Copy after login

2. Restart the sshd service

    # systemctl restart sshd
Copy after login

In this way, the connection to centos7 will not be interrupted by timeout even if it is not operated for a long time.

The above is the detailed content of Centos 7 SSH connection timeout automatic disconnection solution. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!