The MAC terminal is connected to the server

Posted on

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

Leave a Reply

Your email address will not be published.