Change the password of an Ubuntu VPS (18.04 to 24.04)


When is it useful to change the password?

  • If you received a default password and want to use a more secure one
  • If you're managing multiple users and need to update their credentials
  • As a good security practice or routine rotation

Requirements

  • SSH access to your VPS (with root or sudo privileges)
  • SSH client (such as PuTTY, Linux/macOS Terminal, etc.)

Steps to change the password

1. Connect to your VPS via SSH

From your terminal (Linux/macOS) or using PuTTY on Windows:

ssh user@your-server-ip

Example:

ssh root@23.175.40.0

2. Change the password of the current user

Once logged in, run the command:

passwd

You will be prompted to:

  • Enter your current password (in some cases)
  • Type the new password
  • Confirm the new password

If everything went well, you’ll see:
password updated successfully


3. Change another user's password (optional)

If you are root or have sudo access, run:

sudo passwd username

Example:

sudo passwd agus

Security tips

  • Use long, complex passwords
  • Never reuse the same password across different servers
  • Consider enabling SSH key authentication and disabling password login for better security

Need help?

If you can’t access your VPS or lost your credentials, open a ticket from your client panel or contact us for support. We can help you reset the password from the console.

You can also reach us on our social networks:

Was this answer helpful? 0 Users Found This Useful (0 Votes)