Cloud Service >> Knowledgebase >> VPS Hosting >> How To Enable SSH On VPS Through WHM?
submit query

Cut Hosting Costs! Submit Query Today!

How To Enable SSH On VPS Through WHM?

For secure server management, you must enable Secure Shell (SSH) on your Virtual Private Server (VPS). With the use of SSH–you may remotely control your server and run commands across an insecure network. 

This knowledge-based article will walk you through using WebHost Manager (WHM) to enable SSH on your VPS.

What is SSH?

Network protocols like SSH give administrators a safe method to connect to and control remote systems. Data is encrypted, guarding against risks like connection hijacking and eavesdropping. Secure file transfers, remote logins, and the safe execution of commands on a remote computer are all frequent uses for SSH.

What is WHM?

An effective web-based solution for managing hosting accounts on a web server is called WebHost Manager (WHM). Even those who may not be very experienced with server maintenance may do activities like activating SSH thanks to WHM's user-friendly interface.

Why Enable SSH?

- Secure Access: SSH allows secure remote access, ensuring data and command execution are encrypted.

- Convenience: Manage your server from anywhere without being physically present.

- Advanced Control: Execute commands, transfer files, and manage your server more efficiently.

Prerequisites

Before you proceed, ensure you have:

- WHM Access: Administrator-level access to WHM.

- Basic Knowledge: Understanding of basic server management and SSH concepts.

- Root Access: The ability to perform root-level tasks.

Step-by-Step Guide to Enabling SSH on VPS Through WHM

Step 1: Log into WHM

- Open your web browser and navigate to your WHM URL. This is usually https://your-server-ip:2087.

- Enter your username and password. These credentials are typically provided by your hosting provider or were set up during the initial server configuration.

- Click "Login" to access the WHM dashboard.

Step 2: Access SSH Configuration

- Once logged in, use the WHM search bar located at the top left corner of the screen. Type in "SSH" to quickly find the SSH settings.

- Click on "SSH Configuration" or "Manage Shell Access" from the search results.

(Example of WHM interface for SSH configuration)

Step 3: Enable SSH Access

- In the SSH configuration section, you will find various options related to SSH settings.

- Look for an option to "Enable SSH" or "Allow SSH Access". This might be a checkbox or a toggle switch depending on your WHM version.

- Activate SSH by enabling this option.

Step 4: Configure SSH Settings

Set the SSH port: By default, SSH uses port 22. For enhanced security, you might want to change this to a different port number. Enter your desired port number in the port configuration field.
Example: Change the port to 2222 instead of 22.
text
Copy code
SSH Port: 2222

 

- Permit Root Login: For security reasons, it is advisable to disable root login over SSH. Instead, you should use a regular user account and switch to the root user once logged in.
text
Copy code
PermitRootLogin: no

1. However, if you still want to allow root login, ensure that "Permit Root Login" is set to yes.

2. Save Changes: After making the desired changes, ensure to save your configuration by clicking on the "Save" or "Update" button at the bottom of the page.

Step 5: Restart SSH Service

To apply the changes, you need to restart the SSH service on your VPS.

- Go back to the WHM dashboard.

- Use the search bar to find "Restart Services".

- Click on "SSH Server (OpenSSH)" from the list.

- Confirm the restart by clicking on "Yes" or "Proceed".

(Example of restarting SSH service in WHM)

Step 6: Test SSH Access

- Open your SSH client: Use an SSH client like PuTTY for Windows or the terminal on macOS/Linux.

Connect to your VPS: Use the server’s IP address and the port you specified earlier.
Example Command:
bash
Copy code
ssh -p 2222 your-username@your-server-ip

- Authenticate: Enter your username and password or use an SSH key if set up.

Step 7: Secure Your SSH Configuration

For additional security, consider implementing the following:

- Use SSH Keys: Replace password authentication with SSH keys for stronger security.

- Disable Root Login: As mentioned earlier, disable root login to prevent direct access to the root account.

- Use Fail2Ban: Implement Fail2Ban to block IP addresses that fail to authenticate multiple times.

Conclusion

Start following our step-by-step guide and enabling SSH on your VPS through WHM. SSH is a vital tool that helps manage your server while keeping it secure. By using the steps outlined above, you can remotely connect to the VPS and securely access it, run commands, and move files with ease.

Please bear in mind that although SSH offers strong security, you have to adhere to the right measures in handling the server. It is recommended that you update your server on a daily basis, use authentication, and always watch your access logs to ensure that your server is secure.

If you have any problems or want additional help, though, you should refer to WHM Documentation or contact your dedicated hosting service.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!