In fact, the terminal terminal on Mac OS system comes with it.
At first, I used the command SSH [email protected], which is by default via port 22.
And my VPS SSH port is not 22, the result is not connected, display: Ssh:connect to host localhost Port 22:connection refused
So I Google, found that it is to change ssh_config, the result is not used, and some people said to change the ssh.plist, the results can not be changed.
Finally, I ran SSH, prompting for the following commands:
USAGE:SSH [ -1246AACFGGKKMNNQSTTVVXXYY] [-B bind_address] [-c Cipher_spec] [-D [Bind_address:]port] [-E Log_file] [-e Escape_char] [-F configfile] [-I PKCS11] [-I identity_file] [-L [bind_address]: ]port:host:hostport] [-l login_name] [-m Mac_spec] [-O ctl_cmd] [-o-option] [-p port] [-Q cipher | Cipher-auth | Mac | Kex | Key] [-R [Bind_address:]port:host:hostport] [-S ctl_path] [-W Host:port] [W-Local_tun[:remote_tun] ] [[Email protected]]hostname [command]
One of the things I noticed was [-P port], so I ran the following command:
SSH [email protected]1.2. 3.4 12345 // or it can be 1.2. 3.4 12345
It worked.
If it is root, you can enter the password.
MAC OS system remotely connects to server or VPS via SSH, similar to putty on window