In this article, we will show you how to connect to your remote Linux server from Windows, Linux, or macOS by using SSH.
What is SSH?
SSH is a network protocol that allows you to connect to a remote system and manage it from the terminal. Basically, it allows you to log into your remote server and execute commands – just without the graphical interface.
In this article, we will cover ways to connect to a Linux system from Windows, Linux, and macOS.
There are two ways to authenticate into a remote server via SSH: password authentication and key-based authentication. This article covers password authentication.
We assume that either you or your hosting provider have already installed and configured SSH on your remote server.
Before we proceed, you need to have the following information:
- IP Address or a domain name of your remote server (e.g.220.127.116.11 or mysite.com).
- SSH Port Number on your remote server (the default value is 22).
- Username and Password of a user on your remote server.
Connecting to a Remote Server via SSH
Windows users need to install PuTTY, which is a free SSH client for Windows. Pick the Windows Installer (either 64-bit or 32-bit version, depending on your system) on the download page.
Once PuTTY is installed, launch the program and fill out the highlighted fields:
Change username to an actual user’s name on your server (e.g. john).
Change 18.104.22.168 to your server’s actual IP address or domain name.
Change 22 to your server’s SSH port (22 is common because it's the default SSH port).
Then click on Open and accept the certificate in the pop-up window.
If all is well, you will be prompted to the final step: entering the password for the remote server's user.
Congratulations, you are now able to execute commands on your remote server.
Apple users have it the easiest. You don't have to install SSH because it is already present on your system. The only thing you need to do is to use the SSH command.
Navigate to Applications -> Utilities, and click on Terminal.
You will see a terminal window where you can enter commands.
Type in the following command from your terminal to connect to your remote server: