Browse help topics

Getting Started

How to Connect to Your VPS With SSH on macOS

Open Terminal and run ssh with your VPS username and IP address, for example ssh username@203.0.113.10. macOS includes SSH, so there's nothing to install.

  • Updated
  • Last reviewed
  • Beginner
  • About 10 minutes

Applies to: Linux OpenSSH Blue Arctic VPS Hosting and Virtual Dedicated Servers (VDS); macOS

On this page
  1. Before you start
  2. Step 1: Open Terminal
  3. Step 2: Connect
  4. The first time you connect
  5. How to tell it worked
  6. Troubleshooting
  7. Still need help?

SSH (Secure Shell) gives you an encrypted command line on your VPS, so you can manage it from your Mac. macOS already includes the ssh command; you run it in the Terminal app.

Before you start

  • Have the login details we gave you when your server was set up: the server’s IP address, the username and the SSH port (a port is a numbered door on the server). If no port is listed, use the standard port 22. If you don’t have these details, open a support ticket.
  • The examples below use the documentation address 203.0.113.10. Replace it with your own IP address, and replace username with your username.

Step 1: Open Terminal

  1. Click the Spotlight icon in the menu bar, or press Command-Space.
  2. Type Terminal and click Terminal.

You can also open it from Finder: Applications → Utilities → Terminal.

Step 2: Connect

  1. Type the command below and press Return. It opens a secure connection to your server; it doesn’t change anything there.
    ssh username@203.0.113.10
  2. If your login details give a port other than 22, use this instead, replacing PORT with the number:
    ssh -p PORT username@203.0.113.10

The first time you connect

Your computer hasn’t seen this server before. SSH shows the server’s fingerprint, a code starting with SHA256: that identifies the server, and asks Are you sure you want to continue connecting. The end of that line reads (yes/no)? or (yes/no/[fingerprint])?, depending on your SSH version.

  1. If you were given your server’s fingerprint, compare it with the one on screen. If they differ, type no, press Return and open a support ticket.
  2. If you have no fingerprint to compare, check that the IP address you typed matches your login details. Not sure you’ve reached your own server? Type no, press Return and open a support ticket; we’ll tell you what we can do. (SSH then prints Host key verification failed. That’s expected: you chose not to connect.)
  3. Otherwise, type yes and press Return. A line starting Warning: Permanently added appears. That’s normal: your computer has saved the server’s identity, so you won’t be asked again.
  4. When you see username@203.0.113.10's password:, type your password and press Return. Nothing appears on screen while you type; that’s normal. If you see Enter passphrase for key instead, type the passphrase you chose for your SSH key, not the server password. If you’re logged in without being asked, your key was accepted.

How to tell it worked

Your Mac’s own prompt ends with %. When you’re connected, the prompt shows your username and the server’s name instead and ends in $ (or # when you’re root), for example username@server:~$ or [username@server ~]$. Commands you type now run on your VPS. Type exit and press Return to disconnect.

Tip

Instead of a password, you can log in with an SSH key, which is safer. See how to set up SSH key authentication.

Troubleshooting

  • Operation timed out or Connection timed out: nothing answered. Check the IP address and port. Some office and public networks block SSH; try another network, such as your phone’s hotspot.
  • Connection refused: the port is probably wrong. Check the login details we gave you.
  • Permission denied: if it says Permission denied, please try again, the username or password was refused; passwords are case-sensitive. If you’re sure both are right, don’t keep trying: some servers don’t accept a password for every user. If it says Permission denied and then a list in brackets without the word password, such as (publickey) or (publickey,gssapi-keyex,gssapi-with-mic), the server accepts only an SSH key for this user. After two or three failed tries, stop: repeated failures can block your IP address. Open a support ticket instead.
  • A warning that says REMOTE HOST IDENTIFICATION HAS CHANGED: SSH stops and won’t connect. Don’t try to get around it. This is expected if your server’s operating system was reinstalled, but it can also mean you’re not reaching your own server. Open a support ticket and tell us when the warning started; we’ll tell you what we can do. Only when you know why the key changed (for example, you asked for the reinstall, or support says the change is expected), remove the old entry with ssh-keygen -R 203.0.113.10 (with a port other than 22: ssh-keygen -R "[203.0.113.10]:PORT"). This deletes only your computer’s saved copy for that server. Then connect again.
  • Lines that start with ** WARNING and mention a “post-quantum key exchange algorithm”: this is a notice from newer versions of SSH, not an error. It means the server doesn’t yet offer one of the newest kinds of encryption. Your connection is still encrypted and your login carries on. Don’t change SSH settings to hide it. If you have questions, open a support ticket.
  • The session freezes: press Return, then type ~ (tilde, Shift and the key left of 1 on a US keyboard) followed by . (a period). Nothing appears while you type. You’re back at your Mac’s prompt; connect again.
  • More fixes: how to troubleshoot SSH connection problems.

Still need help?

Open a support ticket from the Client Portal at my.bluearctic.com. Our support page explains how the 24/7 helpdesk works. Include your VPS IP address, the exact command you typed (without the password), the full error text, the time you tried and your own public IP address (search the web for “what is my IP”). Never include a password or a private key.

Was this article helpful?

Report outdated instructions or suggest an improvement
Type of report

Please do not include passwords or personal information.

Still need help?

Our support team can look into your account and walk you through it.