This guide shows you how to log in to your VPS via SSH and gain root access. You'll learn how to connect with your username and password, and then elevate your privileges to root level.

How to do it

  1. Step 1: Log in with your VPS credentials

    Connect to your VPS using SSH with the username and password that were created for this VPS.

    Example command:

    ssh username@your-vps-ip
  2. Step 2: Set a root password

    Once logged in, set a password for the root user by running:

    sudo passwd root

    Enter and confirm your new root password when prompted.

  3. Step 3: Switch to root user

    After setting the root password, you can switch to the root user by entering:

    su

    Enter the root password you just created. You are now logged in as the root user.