Logging into Your Server via Secure Shell (SSH)

If you're comfortable using WHM and cPanel, you might be ready to use a command line interface (also called a terminal or the CLI) to access your server. The command line is a way to control your computer using only the keyboard and text-based commands. The command line was the only way people could control computers until the 1960s. Every computer still has a way to use command line commands.

You don't need to use the command line to change basic settings on your server: WHM works well for most thing you'll want to change. Looking at the terminal output can be intimidating, but a basic knowledge of command line can make some things easier. 

terminal sample

To use a terminal to make changes on your server, the first step is to log into your server using the Secure Shell protocol (SSH). If you aren't familiar with SSH, it's a good idea to read about basic SSH concepts first.

Sometimes you'll hear “SSH” as a verb: “I'm going to SSH into my server.” This is the same as logging into your server via SSH. Logging into your server via SSH makes sure no one malicious can intercept your root password or get into your server.

#1. Open the terminal (command line interface) on your computer. Every operating system has a different terminal program.

  • On Windows: Windows doesn't include SSH capabilities by default in its command line terminal. You'll need to use an SSH client like PuTTY.
  • On macOS: Click on your Applications icon, then search for “Terminal.” Click on Terminal to launch your command line interface.
  • On Linux: Every distribution of Linux is different, but if you have a graphical interface, open your list of applications and search for “terminal.” Then click to open your terminal.

 

 


 

SSH on Windows with PuTTY


PuTTY is a common SSH client that will allow you to log into your server via SSH from a Windows computer. There are many other SSH clients and you may find another one your prefer.
  1. Download PuTTY and open the program. You'll see a configuration window.
  2. In the Host Name field, enter your server's IP address or hostname.
  3. For the Connection Type, click on SSH.
  4. If you use a port other than 22, you need to enter your SSH port into the Port field.
  5. Click Open to connect to your server. The first time you do this, you will see a warning about the host key. Make sure you have entered the correct connection information and then click Yes.
  6. Now you'll be asked to enter your root username and password. Press Enter and as long as your password is correct, you'll be logged into your server and can use regular command line commands!

 



#2. You will see the name of your user on your terminal screen and a blinking cursor. It's time to start using commands!

 

terminal sample

#3. The command to log in via SSH is ssh. You'll be logging in as the root user, so your username is “root.” To find the right server to connect to, you use your server's IP address to tell your sshcommandwhere to go. To put all those pieces together, type

ssh root@youripaddress

Make sure to replace "your IP address" with your server's IP address.


 

Tip

Don't know your server's IP address? It's simple to find!
  1. Log into your HostHolder member's account.
  2. Under Your Hosting Infrastructure, you'll see a listing of your servers. One of the main fields will be Primary IP. That's your server IP address!

#4. Press Enter.

#5. A prompt will appear asking for your server's root password. Type in the root password and press Enter. When typing passwords, you will not see anything change on your terminal screen. This is for security: your typing is still registering.

terminal sample

#6. Once you've verified your identity with your password, the screen will show any failed login attempts and the last time someone logged into your server. You're logged into your server!

terminal sample

7. To close your server connection, type logout and press Enter.

Congratulations! You've successfully logged into your server via SSH. But what does that mean? You can do almost anything through your terminal that you'd do via WHM. Some people prefer to use their terminal to move files around and upload files to their server. Check out our article on useful Linux commands for beginners to learn more.

One of the few things you cannot do via WHM is change the firewall port your SSH connection uses. Once you're comfortable logging in and out of your server, explore how firewall ports work and then learn how to change the SSH port to increase your server security.



  • Command Line, SSH
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Changing The SSH Port

While there are many ways to make sure your server is as secure as possible there are some basic...

Opening Ports In Your Firewall

Occasionally you will find that you need to open up a port in your firewall for some application...

7 Extremely Useful Linux Commands for Beginner

#1: ls : What’s in this directory? The command ls stands for list directory contents. And,...