When dealing with servers, most of us don't have access to the physical server. So this tutorial is dedicated in providing you on how to connect to a Linux Server remotely using Secure Shell (SSH).
What is SSH?
SSH is a very powerful (and secure) tool that allows users to directly access the command line of a Linux server. This will allow you to execute Linux commands to control your VPS Server, manipulate files and applications from the comfort of your home (or office). By default the secure shell (or SSH) uses the port 22.
However, in order to connect to your VPS, first thing you will need is to get an SSH client.
Let's get started!
Note that the IP addresses, and usernames being used were purely meant as an example.
How to connect to linux VPS server with Mac or Linux
- To open Terminal in Mac go to Applications > Utilities, and then open Terminal.
- To open a Terminal in Linux use Ctrl+Alt+T or enter Terminal in the Search function
Type “ssh” to determine connection protocol and then press “Space”, input your Username and server address (IP or Domain name) connected by “@” symbol.
- Considering a user ID of “user1” and a URL of server1.com(184.108.40.206), the following syntax should be entered to connect to the server:
- ssh email@example.com OR ssh firstname.lastname@example.org
You will then be prompted for a password. Enter your password and hit enter.
If you are successful, you should see a command prompt, similar to the following:
How to connect to linux VPS server from Windows
In order to login to the Linux server from a Windows device, we will be using a third party software PuTTY.
PuTTY is a free software application for Microsoft Windows operating systems which can be used to make an SSH connection to your server. PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is an open-source software that is developed and supported by a group of volunteers.
If you don't have PuTTY, you can download the application here.
Open PuTTY Terminal client, you will see the following window:
Enter your connection settings:
- Host Name: enter IP of your server
- Port: 22 (leave as default)
- Connection Type: SSH (leave as default)
Click "Open" to start the SSH session.
If this is your first time connecting to the server from your computer, you will see the following output. Accept the connection by clicking "Yes".
Once the SSH Connection is open, you should see a terminal prompt asking for your username.
- Your server's root username is "root".
Next, enter your password. You can find it in the Clients Portal.
- Please note that you will not see your cursor moving, or any characters typed, when typing your password. This is a standard PuTTY security feature. After you typed it in hit “Enter”.
Congratulations! You are now logged into your server with SSH. Let us know in the comments below what you think.