Loading...
How to connect to your webserver via SSH - Knowledgebase

How to connect to your webserver via SSH Print

  • web server, ssh, command line, terminal, how to
  • 2

you are reading this article, chances are you are new to the world of web administration or you are looking back for reference. Either way, it's always a good idea to check back now and then to refresh some of those web admin skills.

Recently I’ve been inspired to create a short series of articles that highlight some of the basic aspects of working with web servers. I tend to focus on articles that are geared towards people who already have ‘working knowledge of web servers. I hope this new series will benefit you during your journey to webmaster stardom.

 

Prerequisites

You will need the following before connecting to your server via SSH:

  • Your server's IP address.
  • Your login credentials.

Where do I find my server's login credentials?

From the client area dashboard, you will see "My Products" in the navigation menu on the left. Click "My Products" to open the "My Products & Services" page.

Your "My Products & Services" page will look similar to this one:

Click the blue "Manage Product" button next to the server you want to find information for.

This will open the "Manage Product" page. You will see (in blue font) "First time login details". Clicking this blue link will open a tool-tip to display the server's username and password, which you will need to open an SSH connection.

There are two basic ways to connect to a web server via SSH (well three). Using Windows, macOS, or Linux (Ubuntu, Linux Mint, etc.). I say two because using SSH via macOS and Linux are basically the same. But first let's start with Windows.

Windows

There are multiple ways to use SSH on windows. The most popular (and my favorite) is to use the program PuTTY. PuTTY, which you can find here, is an SSH and Telnet client for Windows.

PuTTY Configuration

The PuTTY interface is simple enough to operate. Take your server IP address and paste it in the IP address field, type your port number (normally the default SSH port is 22), then click open.

You will be prompted with a security RSA2 warning which means this is your first time connecting to this server or the server’s encryption key fingerprint is different. Meaning the system admin has changed the key or someone is faking the connection in an attempt to get you to connect to a malicious SSH session.

You can save your server’s IP address by filling in the information and clicking the ‘save’ button. This will add your server’s connection info to the stored session list. This is very helpful when you have multiple servers.

PuTTY will open a terminal asking for a username and password. If you connecting to a fresh OS install, your web host will more than likely send you your login credentials. The username is almost always ‘root’.

After successfully accessing your server via SSH, from here you can admin your server according to your needs.

macOS & Linux

Connecting to a web server via SSH using macOS and Linux are similar as they both use the systems command line.

From the macOS desktop, you can open the terminal using either of these two options:

  • Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
  • In the Finder, open the /Applications/Utilities folder, then double-click Terminal.

In Linux, we will use Ubuntu as an example. Pressing the key combination Ctrl+Alt+T will open the command line.

Once you are in an active terminal session, use this command to start an SSH connection to the target server.

$ ssh username@ip-address

If you are wanting to connect to a different port other than 22 use:

$ ssh username@ip-address -p [portnumber]

If you are logging into a fresh OS then most likely your username is ‘root’ and password has been set during your OS install or inherited from a previous install. The root password can normally be reset in your web host’s client area.

After successfully connecting, you will be prompted with a security RSA2 warning which means this is your first time connecting to this server or the server’s encryption key fingerprint is different. Meaning the system admin has changed the key or someone is faking the connection in an attempt to get you to connect to a malicious SSH session.

In this guide, you have learned a couple of ways to connect to a web server (or localhost) via SSH in Windows, macOS, and Linux. The next step would be to work on commands and some basic security.


Was this answer helpful?

« Back