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:
Here, click on Manage Shell. On the Mange SSH page, click the toggle button to enable SSH access for the server, as shown below:
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:
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