It seems that SSH has not been operated for a period of time and the session has been automatically disconnected.
Server side:
Modify the /etc/ssh/sshd_config configuration file ClientAliveInterval 300 (default is 0). The parameter means that every 5 minutes, the server sends a message to the client to maintain the connection. Use service sshd reload to make the modification effective. If you still find that there is a problem, you can try setting 300 to a smaller value, such as 60.
Disconnect the ssh connection under the default configuration and press the three keys "Enter ~ ."
It seems that SSH has not been operated for a period of time and the session has been automatically disconnected.
Server side:
Modify the /etc/ssh/sshd_config configuration file ClientAliveInterval 300 (default is 0). The parameter means that every 5 minutes, the server sends a message to the client to maintain the connection. Use service sshd reload to make the modification effective. If you still find that there is a problem, you can try setting 300 to a smaller value, such as 60.
ctrl+z needs to be done twice