---
title: "How to Connect to Your Server via SSH"
description: "In this tutorial, we will show you how to connect to your VPS and dedicated server via SSH. This will allow you to interface with your server via Command Line Interface (CLI). First, we will show you..."
url: https://www.inmotionhosting.com/support/server/ssh/connect-ssh/
date: 2016-05-13
modified: 2025-07-30
author: "InMotion Hosting Contributor"
categories: ["SSH and Root Access"]
type: post
lang: en
---

# How to Connect to Your Server via SSH

![SSH Connection Guide Hero Image](https://www.inmotionhosting.com/support/wp-content/uploads/2021/02/SSH-Connection-Setup-Guide-1024x538.jpg)

In this tutorial, we will show you how to *connect* to your VPS and dedicated server via **SSH**. This will allow you to interface with your server via *Command Line Interface* (CLI). First, we will show you how to add your IP address to the firewall to allow you to access your VPS / dedicated server. Then we will show you how to connect with both PuTTY, and Terminal.

## 1. Add Your IP to the Firewall

1. [Look up your IP address](https://support.inmotionhosting.com/ipcheck.php). Write it down so you have it for later use.
2. [Login to WHM](https://www.inmotionhosting.com/support/edu/whm/log-into-whm/).
3. Type **firewall** in the search box, then click the **Add IP to Firewall** link in the *navigation* menu.[![Add IP to Firewall](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_add-ip-to-firewall.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_add-ip-to-firewall.png)
4. In the **Allow Rule** field, enter your IP address.
5. Click the **Add Rule / Restart** button.[![Add Rule / Restart](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_adding-ip-to-firewall.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_adding-ip-to-firewall.png)

You are finished when you see a message stating “*Your IP(s) have been added, and APF is being restarted*.”

## 2. Connect Using PuTTY or Terminal

After adding your IP address to the firewall, you can connect to the server using a client (such as PuTTY), or directly in terminal (if you are a Linux, or Mac user). This section includes guides for both PuTTY and Terminal.

**Connect Using:**

- [PuTTY](#connect-with-putty)
- [OpenSSH](#openssh)
- [Terminal](#connect-with-terminal)

### Connecting to Your Server via PuTTY

1. [Download](https://www.putty.org/) and Install PuTTY.
2. In the **Host Name (or IP address)** field, enter your *domain* name, or the IP address of your server.
3. Click the **Open** button.[![Open Putty Connection](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_open-putty-connection.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_open-putty-connection.png)
4. You will see a *PuTTY Security Alert*, click the **Accept** button.[![PuTTY Security Alert](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_accept-putty-security-alert.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_accept-putty-security-alert.png)
5. When the *login as* message comes up, enter your username (cPanel username, or root), then click the **Enter** key.[![Enter your credentials to login](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_putty-login-as.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_putty-login-as.png)
6. Enter your cpanel password (or root password if you are connecting as the root user), then click the **Enter** key. The password will not show when you type it.[![Enter your credentials to login](https://www.inmotionhosting.com/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_connecting-ssh-with-putty.png)](/support/wp-content/uploads/2016/05/dedicated-hosting_ssh_connecting-ssh-with-putty.png)

### Connecting to Your Server via Windows OpenSSH

OpenSSH is natively included with Windows 10. Use **Powershell** to access it:

1. Open the **Start** menu and type **Powershell**.
2. Select **Powershell**,then **Run as Administrator**.
3. [Continue to the Unix instructions below](#terminal).

### Connecting to Your Server via Terminal

1. Open the terminal on your computer.
2. Type ssh, followed by a space. Then your username, followed by the ‘@’ symbol, and your domain (or IP address) for the hostname and hit the **Enter** key. For example: ssh username@example.com
3. If you see a message stating “*Are you sure you want to continue connecting*” type **yes**, then click the **Enter** key.
4. You will then be prompted to enter your password. Type your password, then click the **Enter** key to connect. The password will not show when you type it.

Congratulations, now you know how to connect to your server via SSH! Next, consider learning how to navigate the command line structure in SSH.
