Connecting to a server via SSH on MacOS | INTROSERV
EUR
european

EUR

usa

USD

English En
Ex. VAT Ex. VAT 0%

Connecting to a server via SSH on MacOS

SSH (Secure Shell) is a protocol for securely accessing remote systems over a network. This guide explains how to connect to a server via SSH on a macOS device.

Requirements

To connect via SSH on a macOS device, you will need:

  1. SSH client: the built-in SSH client available in the Terminal application.
  2. Server details: the IP address or hostname of the server, as well as its SSH port number (usually 22).
  3. SSH credentials: the username and either the account password or an SSH private key, depending on the server configuration.

Connecting using Terminal

Open the Terminal application and run the following command:

ssh username@server_IP

Replace username with your actual username and server_IP with the IP address or hostname of your server.

If you are connecting to the server for the first time, SSH will report that the authenticity of the host cannot be established and will show the server's key fingerprint. If you have a trusted fingerprint from your provider or administrator, verify that it matches, then enter yes to continue. The server's host key is then saved to ~/.ssh/known_hosts. You will not normally be asked to confirm the same host again unless the host key changes or the corresponding entry is removed.

If password authentication is enabled, enter the account password when prompted. If key-based authentication is configured, SSH authenticates you using your private key. After successful authentication, you will be connected to the server console.

If the server uses a non-standard SSH port, specify it with the -p flag:

ssh -p 22777 username@server_IP

Info

If the connection fails, verify that the server is reachable and that SSH is running on it.

Connection using Termius

Termius is a third-party SSH client with SFTP support for macOS.

Creating a new host

In the Hosts section, select New Host. In the Address field, enter the IP address or hostname of your server, and set the SSH port if it differs from 22. Under Credentials, enter the Username and, if you use password authentication, the Password. You can also give the host a recognizable name.

Connecting to the host

After saving the host, return to the Hosts tab and select it to connect. When connecting for the first time, Termius shows the server's key fingerprint. If you have a trusted fingerprint for the server, verify it before accepting the connection.

Using SSH key authentication

In addition to password authentication, SSH key authentication is also available. Edit the saved host and, under Credentials, open Key, Certificate, FIDO2. Add your SSH key through the Termius keychain, where you can import an existing key or create a new one, then save the host.

Info

Before using key-based authentication, make sure the corresponding public key is added to the ~/.ssh/authorized_keys file on the server. Without this, the key will not be accepted.

SFTP file transfer using Termius

The Termius application includes an SFTP file manager with a two-panel interface, allowing you to transfer files between your Mac and the server.

Open the SFTP tab to access the file manager. One panel shows Local, the files on your Mac. On the other panel, use Select host to connect to your saved server. You can then upload and download files between your Mac and the server, as well as manage files in either location.

VAT

  • Other

    Ex. VAT

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    22%
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • germany
  • Español
  • Italiano
  • Poland
  • Русский
  • Slovenski
  • Türkçe
  • ukraine
  • kingdom
  • French
  • Hrvatska
  • Other
  • Austria
  • Belgium
  • Bulgaria
  • Croatia
  • Cyprus
  • Czech Republic
  • Denmark
  • Estonia
  • Finland
  • France
  • Germany
  • Greece
  • Hungary
  • Ireland
  • Italy
  • Latvia
  • Lithuania
  • Luxembourg
  • Malta
  • Netherlands
  • Poland
  • Portugal
  • Romania
  • Slovakia
  • Slovenia
  • Spain
  • Sweden
  • USA