The MAC terminal is connected to the server

Time:2020-9-20

After the MAC terminal is connected with the remote server, it may be disconnected because there is no data interaction with the server for a period of time. Now, the following methods can be used to maintain the long-term connection between the terminal and the remote server.

Edit “SSH”_ Config “file:

sudo vi /etc/ssh/ssh_config

Under host *, add:

ServerAliveInterval 60 

Finally, use: WQ! To save and exit.

This means that every 60s the client sends an empty packet to the server so that the connection can be kept intact.

The MAC terminal is connected to the server

Recommended Today

DK7 switch’s support for string

Before JDK7, switch can only support byte, short, char, int or their corresponding encapsulation classes and enum types. After JDK7, switch supports string type. In the switch statement, the value of the expression cannot be null, otherwise NullPointerException will be thrown at runtime. Null cannot be used in the case clause, otherwise compilation errors will […]