Probably because the server idle time is too long to close the ssh connection (log on to the server does not operate for a long time). You can configure the ssh client ServerAliveInterval, or by configuring ssh server-side ClientAliveInterval.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
ServerAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the server, ssh(1) will send a message through
the encrypted channel to request a response from the server. The
default is 0, indicating that these messages will not be sent to
the server. This option applies to protocol version 2 only.
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the client, sshd(8) will send a message
through the encrypted channel to request a response from the
client. The default is 0, indicating that these messages will
not be sent to the client. This option applies to protocol
version 2 only.
|
ssh server configuration:
|
echo "ClientAliveInterval 60" | sudo tee -a /etc/ssh/sshd_config
|
The above command to configure ssh to connect more than 60 seconds without operation, disconnected.
ssh client configuration:
|
echo "ServerAliveInterval 60" >> ~/.ssh/config
|
Need to set timeout.
Không có nhận xét nào:
Đăng nhận xét