What is the terminal?
The terminal is a screen where you type commands to tell the computer what to do. On a VPS you reach it using SSH. SSH is a safe way to control a server from far away.
Change your own password
- Log in to your server over SSH.
- Type this command and press Enter:
This starts the password change for the user you are logged in as.passwd - When asked for the current password, type it. The screen shows nothing while you type. This is normal.
- Type your new password and press Enter.
- Type the new password again to confirm.
- Look for the message that says the password was updated.
Change another user's password
You need root access or sudo rights for this. Root is the all-powerful admin user. Sudo lets a normal user run admin commands.
- Log in as root, or as a user who can use sudo.
- Type the command with the user name at the end. Here the user is called
john:
If you use sudo, typepasswd johnsudo passwd john. - Type the new password and press Enter.
- Type it again to confirm.
You do not need the old password when you change it as root.
Make a strong password
- Use at least 12 characters.
- Mix capital letters, small letters, numbers and symbols.
- Do not use your name, birthday or common words.
- Use a different password for every account.
If it does not work
- "Authentication token manipulation error" can mean the disk is read-only or full.
- "Password is too simple" means the system wants a stronger one.
- "Permission denied" means you need root or sudo.
Tip: Changing the root password can lock you out if you mistype it. Keep your current session open until you have tested the new password in a second window.
Quick recap
- Type
passwdto change your own password. - Type
passwd usernameas root to change another user's password. - The screen shows nothing while you type a password.
- Choose a long and unique password.
- Test the new password before closing your old session.