Xshell connection to Ubuntu via ssh solution: 1. Xshell client settings modify KeepAlive time 2. Server Side modification Modify/etc/ssh/sshd_config file, find ClientAliveInterval0 and ClientAliveCountMax3, remove the annotator ("#"), and change the value of 0 corresponding to ClientAliveInterval to 60 and ClientAliveInt.
Solution to Xshell disconnection from Ubuntu via ssh:
1. Xshell client settings
Modify the Keep Alive Time
2. server-side Modification
Modify the/etc/ssh/sshd_config file, find ClientAliveInterval 0 and ClientAliveCountMax 3, and remove the annotator,
Change the value of 0 corresponding to ClientAliveInterval to 60,
ClientAliveInterval specifies the time interval for the server to request messages from the client. The default value is 0 and no message is sent.
ClientAliveInterval 60 indicates that the request is sent once every minute and then the client responds to the request, so that the persistent connection is maintained.
ClientAliveCountMax: use the default value of 3. ClientAliveCountMax indicates that the client will be automatically disconnected If no response is received by the client after the server sends a request.
Restart the ssh service
Www.linuxidc.com @ ubuntu :~ $ Sudo/etc/init. d/ssh stop
Www.linuxidc.com @ ubuntu :~ $ Sudo/etc/init. d/ssh start