Top 4 most effective ways to secure a VPS

VPTS Team Content has been moderated
Published date:30/3/2025 Update:30/3/2025 Views:129 Reviews: 4.9/5146reviews
VPTS on

Have you truly secured your VPS properly? When was the last time you changed your VPS password? Are you using the default password for your VPS? In this article, VPTS...

Have you truly secured your VPS properly? When was the last time you changed your VPS password? Are you using the default password for your VPS?

In this article,VPTSwill explore with you 4 simple yet extremely effective ways to secure and protect your VPS with complete safety. Let's get started with us right away!

What is VPS security?

VPS security is the process of implementing measures and procedures toprotect virtual servers from threatssuch as cyber attacks, unauthorized access, and malware. The goal of this process is to ensurecontrol access permissions, protect data, and prevent denial-of-service attacks(DoS), while maintaining system integrity, security, and availability. This is a key factor that helps the VPS operate stably, securely, and reliably in an increasingly complex network environment.

Method 1: Use a strong password and change it regularly to secure your VPS.

Step 1: Log in to your VPS.(The illustrative example below uses the Windows Server 2012R2 operating system)

Step 2: For faster and easier operation, you can use the support tool from VPTS.

  • Double-click to openTool VPTS.
  • In sectionPassword Tool, enter the new password.

👉 Note: Passwords must be sufficiently strong and contain special characters to ensure security.

  • After entering, click the button"Change Password"to complete the password change process.
Illustration Changing VPS password using VPTS tool
Change VPS password using VPTS tool

The guide above is for Windows Server OS; if you are using Linux OS, VPTS has a dedicated article guiding password changes on Linux

Click here to view: 👉Instructions for Changing Password on Linux

Method 2: Change default port – a simple step to enhance VPS security

  • For Windows operating systems, follow these steps:

Step 1: Log in to your VPS.(The illustrative example below uses the Windows Server 2012R2 operating system)

Step 2: To save time, you can use the support Tool from VPTS to complete it faster.

  • Click the iconVPTS Toolon the desktop screen to open the tool.
  • In section“Change current RDP port”, you will see the default port is 3389.
  • Enter the new port you want to use, for example 7979, to replace it.
  • After entering, click the button“Change”to apply.

📌 Note: After changing the port, when connecting via Remote Desktop (RDP), you must append the new port to the IP address, for example: 103.xxx.xxx.xxx:7979

VPS Security
Change VPS port using VPTS tool

Step 3: After successfully changing the port, reconnect to the VPS via Remote Desktop using the new port by appending a colon (:) and the port number after the VPS IP address.

VPS Security
Connect to VPS using new RDP port

After entering the IP and port, clickConnectallows you to use the VPS as normal.

  • For Linux operating systems, follow these steps:

Step 1: Log in to the VPS using Bitvise SSH Client and click "New terminal console"

VPS Security
Bitvise SSH Client interface

Step 2: Once the Terminal window opens, copy the command below and paste it as shown: 

Copy
vi /etc/ssh/sshd_config
VPS Security
sshd_config configuration file (Linux – CentOS/Ubuntu)

Press the keyito enter file editing mode. Then, navigate to the line containingPort 22. If this line contains the mark#at the beginning (indicating it is currently disabled), please delete the symbol#and replace the number22with the new port you want to use – for example:8386

VPS Security
sshd_config configuration file (Linux – CentOS/Ubuntu)

When finished editing, press the keyEscto exit editing mode, then enter the command:wqthen press keyEnterto save changes and exit the configuration file.

Then run the command below to restart the ssh service as shown in the image below!

Copy
systemctl restart sshd
VPS Security
Restart SSH service after changing port

Step 3: Return to Bitvise SSH Client and log back in to the VPS using the port you just changed.

VPS Security
Bitvise SSH Client interface

Method 3: Reduce attack risks by changing the VPS login user

Step 1: Log in to your VPS.(The illustrative example below uses the Windows Server 2012R2 operating system)

Step 2: For faster and more convenient operation, you can use the support Tool from VPTS.

  • Double-click the iconTool VPTSon the screen to open.
  • In section"Change Admin Account", enter the new username you want to set.
  • After entering, click the button"Change"to apply.

📌 Note:Username must not contain spaces, special characters, or accented Vietnamese letters. Use only alphanumeric characters.

VPS Security
Change Admin account and RDP port using VPTS Tool
  • Switch to manual method 

Step 1: Go to Start and search for Computer Management.

VPS Security
Open “Computer Management” on Windows Server

Step 2: In the left navigation panel, click "Local Users and Groups", then double-click "Users" in the right pane to display the list of user accounts on the system.

VPS Security
Access the user account list

Step 3: Right-click on the account you want to rename, select "Rename", then enter the new Username as desired.

📌 Note:Username cannot contain spaces, special characters, or Vietnamese accents. Use only English letters and numbers to ensure system stability.

VPS Security
Rename Administrator account
  • Log in with new user

After successfully changing the default account name, simply use the new username and password to log back in via Remote Desktop as usual.

VPS Security
Log in to the VPS with the new account via Remote Desktop
  • For Linux operating systems

Step 1: Log in to the VPS using Bitvise SSH Client and click "New terminal console".

Step 2: Once the Terminal window opens, copy the command below and paste it as shown.

Copy
sudo vi /etc/passwd
VPS Security
Update CentOS system

Press the keyito enter editing mode. Then, navigate to the first line containingroot:x:0:0:root:/root:/bin/bashand replace the wordrootwith the username you want to change.

VPS Security
Rename root account in /etc/passwd file
VPS Security
Completed renaming the root administrator account

Then run the command below to restart the ssh service as shown in the image below!

Copy
systemctl restart sshd
VPS Security
Restart SSH service after changing user

 Next, run the command below to set a new password for the recently changed user.

Copy
passwd
VPS Security
Change user password on Linux

Step 3: Return to Bitvise SSH Client and log back in to the VPS using the username you just changed.

VPS Security
Bitvise SSH Client interface 

Method 4: Disable Remote Desktop and use VNC to enhance VPS security.

Step 1: Log in to your VPS (in this guide, Windows Server 2012 R2 is used).

Step 2: Open Server Manager, then select Local Server on the left sidebar.

Step 3: Locate the Remote Desktop line, click the current status to modify remote connection settings.

VPS Security
Access settings to disable Remote Desktop

Step 4: Select the "Don’t allow remote connections to this computer" option, click Apply, and finally click OK to save changes.

Now you can access the VPS via VNC after disabling Remote Desktop Connection

Click here to view: 👉Guide to Connecting to VPS via VNC Browser

Conclusion

VPS security is one of the most critical steps to ensure your system always operates stably and safely, avoiding potential risks from cyber attacks. Through the 4 effective methods shared by VPTS – from using strong passwords, changing login ports, changing administrative users to disabling Remote and using VNC – you can fully take initiative to enhance your server's protection layer.

Always remember: security is not a one-time action, but an ongoing process.VPTSalways ready to accompany you in building the most optimal and secure VPS system!

VPTS – Comprehensive Digital Infrastructure Solutions Provider

VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.

Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.

VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.

VPTS Team Contact Information