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.
Applies to: Linux OpenSSH Blue Arctic VPS Hosting and Virtual Dedicated Servers (VDS); macOS
On this page
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 replaceusernamewith your username.
Step 1: Open Terminal
- Click the Spotlight icon in the menu bar, or press Command-Space.
- Type
Terminaland click Terminal.
You can also open it from Finder: Applications → Utilities → Terminal.
Step 2: Connect
- 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
- 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.
- If you have the server’s fingerprint (for example from a support ticket), check it matches. To check it first, type
no, press Return and ask for it in a support ticket. - Type
yesand press Return. A line startingWarning: Permanently addedappears. That’s normal: your computer has saved the server’s identity, so you won’t be asked again. - 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.
Your Mac stores the servers it knows in the file ~/.ssh/known_hosts in your home folder.
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
- Connection timed out: 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 is wrong; passwords are case-sensitive. If it ends withPermission denied (publickey), 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 ask about your server’s key fingerprint. Only when support tells you 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. - 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.