MAC OS system remotely connects to server or VPS via SSH, similar to putty on window

Source: Internet
Author: User
Tags vps ssh port

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.