Environment: centos7
A, SSH connection timeout provided
(1) client settings
Connection Kit: SecureCRT
1, SecureCRT client -> Options (Options) -> Session Options (Session Setup)
2, Terminal (Terminal) -> Set send NOOP command to the server every 60 seconds to maintain the connection
(2) Server Configuration:
vi / etc / ssh / sshd_config added:
ServerAliveInterval 1200 #ClientAliveInterval every option defines the number of seconds to send a signal to the SSH client ServerAliveCountMax 3 #ClientAliveCountMax option defines disconnect from the ssh client after more than how many times the signal did not respond
3 to the client signal, the response did not disconnect, idle timeout: 1200 * 3 = 3600s
vi /etc/ssh/ssh_config
ClientAliveInterval 1200 #ClientAliveInterval option defines the number of seconds the client every time a signal is sent to the service end to end
ClientAliveCountMax 3 disconnect from the ssh server after #ClientAliveCountMax option defines how many times over the signal did not respond
3 a signal transmitted to the server, the response is not disconnected, effectively setting the value to be less than or equal server timeouts
Restart sshd: systemctl restart shhd.service