The quickest way is over SSH. Log in and run:
passwdto change the current user's password, orsudo passwd rootto set a new root password.- Enter the new password twice when prompted.
Choose a long, random password. If you've lost root access entirely, use the VPS control panel in your client area, which usually has a reset root password option, or boot into the VNC console to reset it in single-user mode.
For stronger security, consider switching to SSH key authentication and disabling password logins afterward. On unmanaged VPS this is your responsibility; managed customers can open a ticket if you're locked out.