April 19

Linux: Disable SSH connection timeout

You need to set the Client and the Server to stop the automatic timeout of SSH non active connections.


Add the following to the bottom of the file:
# Client keep alive
ServerAliveInterval 60


Add the following to the bottom of the file:
# Server Keep Alive
ClientAliveInterval 120
TCPKeepAlive yes
ClientAliveCountMax 720

systemctl restart sshd

120 X 720 = 86400 seconds or 24 hours

Copyright 2021. All rights reserved.

Posted April 19, 2022 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B