[CentOS] Problem with ssh disconnecting

Liam O'Toole liam.p.otoole at gmail.com
Tue Feb 13 00:24:39 UTC 2018


On 2018-02-12, H <agents at meddatainc.com> wrote:
> Running CentOS 7 on workstation and having a problem with ssh
> disconnects. My ssh_config contains:
>
> Host *
> TCPKeepAlive yes
> ServerAliveInterval 30
> ServerAliveCountMax 300
>
> and sshd_config on the server contains:
>
> TCPKeepAlive yes
> ClientAliveInterval 60
> ClientAliveCountMax 300
>
> Have I missed any setting needed to prevent these random disconnects?
> I don't think there is anything wrong with the network card, the
> driver, or the cable, since if I am on a VPN connection via another
> server, the VPN and any ssh connection stay up indefinitely.
>
> Thanks.

Another poster has provided some possible reasons for the
disconnections. Whatever the cause, autossh (from the epel repo) is a
good workaround.

-- 

Liam




More information about the CentOS mailing list