In this post, I’d like to share the exact steps to remotely connect to a hosting server via SSH in command line on Windows operating system. Though the screenshots in this post are about SSH connecting to a NameCheap’s hosting server, you may apply the similar steps with other hosting service providers.

Prerequisite: you must have access to the control panel (CPanel) of your hosting account.

1. Enable SSH Access in CPanel

Firstly, you need to log in to your hosting account’s CPanel, which is usually at yourdomain.com/cpanel.

Under Tools section, find the tool named “Manage Shell” or something similar:

Tools Manage Shell in CPanel

Here, click on Manage Shell. On the Mange SSH page, click the toggle button to enable SSH access for the server, as shown below:

Enable SSH in Cpanel

When SSH access is enabled, it shows the access details below, including server IP address, username and connection port number. You’ll use this information to connect to the server in the next step.

2. Use SSH Command to Connect to the Server

On Windows, open a new command prompt window using one of the following ways:

– press shortcut Windows key + R, then type cmd and hit Enter.

– press Start button, type in cmd, and click on Command Prompt in the search result.

And type ssh command in the following form to make connection to the remote hosting server:

                ssh username@server_ip -p SSH_port

Replace username, server_ip and SSH_port with the access details you get in the first step. For example:

                ssh johndoe@60.250.30.11 21098

If it’s the first time you connect, you’ll see the following warning message:

The authenticity of host server_ip_address:port_number can’t be established.

Are you sure you want to continue connecting to (yes/no/[fingerprint])?

This is because the remote host is unknow. So type yes and hit Enter, it will say:

Permanently added server_ip_address:port_number to the list of known hosts.

And then it asks for password. Enter the password you find in the email titled something like “Your Hosting Account Details” sent by your service provider, and hit Enter. You’ll see successful login message, as shown in the following screenshot:

Connect SSH on Windows in command line

Now you connected to the remote hosting server via secure shell connection (SSH). You can use Linux/Unix commands depending on the remote operating system to work with the server. And after done working, type exit to quit.

You can watch the following video to see the steps in action:

Summary

That’s my step-by-step guide to connect to a remote hosting server via SSH command on Windows operating system. You need to login to your CPanel account to enable SSH access, and then use the ssh command in a Command Prompt window to connect to the server, with the details (server IP, username, port number) provided when SSH access is enabled. And use the password provided in the welcome email sent from your hosting provider.


Leave a Reply

Your email address will not be published. Required fields are marked *