1. Connect
ssh-t [email protected] public IP address-P 22 (port number)
2. The phenomenon of broken price appeared
It's a drop-off phenomenon.
Solution Scenario One: If you have more than one server, do not want to set on each server, the following actions: 1, run the command: CD ~/.SSH/2, if Run command ls, no config, new Configvim config3, In config in the input: Serveraliveinterval 604, save file (: x) in the link to the Linux server, there will be no disconnection problem. Scenario Two: If you have multiple personal Management servers and do not want to set them on each client, simply add the following configuration to the server's/etc/ssh/sshd_config: Clientaliveinterval 60 Scenario Three: If you only want to keep the current SSH connection, You can use the following command: Ssh-o serveraliveinterval=60 [email protected]
Using Iterm to operate remote server under Mac