How to Connect to Linux Server From Mac or Linux

How to Connect to Linux Server From Mac or Linux

If you use MacOS or any Linux Distro you don't need to install any third-party software to establish SSH connection from your computer to your Linux server as Terminal App comes pre-installed with every Linux Distribution and Mac OS versions. In this tutorial we will learn how to connect to Linux Server from Mac or Linux.

Table of Contents

How to Open Terminal on Mac

Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal. The Terminal app will open.

How to Open Terminal on Linux

If you are using a Debian based Linux Distro like Ubuntu, press Ctrl + Alt + T on your keyboard, the Terminal app will open. Alternatively you can find the Terminal app on your installed applications list. The procedure is more or less same for every Linux Distros.

How to Connect to Linux Server From Mac or Linux

Open terminal App and type ssh username @xxx.xxx.xxx.xxx and hit enter.

1➜  ~ ssh [email protected]
  • Remember to replace username with the username that you set during Operating System installation. Usually the username is root by default.
  • Replace xxx.xxx.xxx.xxx with your Server IP.

If you are connecting to the server for the first time you will be asked to grant the key fingerprint. Type yes and hit enter.

1➜  ~ ssh [email protected]
2The authenticity of host '192.168.68.115 (192.168.68.115)' cant be established.
3ECDSA key fingerprint is SHA256:q34xyhLpvBwD+ELM2Ir0qLYuZXpp/xCDE1I4Vtao8H8.
4Are you sure you want to continue connecting (yes/no)? yes

You will be then prompted to input your password. Type your password and hit enter.

1➜  ~ ssh [email protected]
2The authenticity of host '192.168.68.115 (192.168.68.115)' can't be established.
3ECDSA key fingerprint is SHA256:q34xyhLpvBwD+ELM2Ir0qLYuZXpp/xCDE1I4Vtao8H8.
4Are you sure you want to continue connecting (yes/no)? yes
5Warning: Permanently added '192.168.68.115' (ECDSA) to the list of known hosts.
6[email protected]'s password:
7Last login: Sat Sep 10 14:05:24 2022
8[root@ifixlinux ~]#

If you see output similar to the output shown above, congratulations you have successfully logged into your server over SSH.

Here's a video demonstration

Connect to the server using Terminal App on Linux or Mac

This article is a part of a series.