Vault password rejected on server login: step-by-step troubleshooting
For customers who received a password from a vault but still cannot log in to a server. This runbook helps you confirm whether the issue is the username, the login method, the secret itself, or a server-side policy, and gives exact checks and fixes.
TL;DR — If the password from the vault does not work, the most common cause is that you are using the right secret with the wrong username or wrong login method. First confirm the exact account name, then verify whether the server expects SSH key login instead of password login, and only then rotate or reset the password. Reading time: ~6 min
The scenario
It is a normal Tuesday afternoon and you need to get into a server to check a site issue or approve a deploy. You open the vault, copy the password carefully, paste it into your terminal or hosting panel, and get "Access denied" or "Permission denied" again and again. You try once more in case the paste included a space, but it still fails. Now you are wondering whether the vault entry is stale, whether the server wants a different username, or whether password login is disabled entirely.
Symptoms
- Login prompt rejects the password even after copy-paste.
- SSH (Secure Shell, encrypted remote login) shows:
Permission denied, please try again.
Permission denied (publickey,password).
- Linux console or remote terminal shows:
Login incorrect
Authentication failure
- Database login using a vault password shows:
FATAL: password authentication failed for user "app_user"
Access denied for user 'app_user'@'10.0.0.5' (using password: YES)
- Windows Remote Desktop may show:
The user name or password is incorrect.
- Your hosting or cloud dashboard accepts the server selection but rejects the credentials in its web console or managed terminal.
- A teammate can log in with an SSH key, but your password login fails.
Likely causes
| Cause | How common | Quick check |
|---|---|---|
| Wrong username for the password | Very common | In the vault entry, compare the "username" field with the login name you are using |
| Server does not allow password login | Very common | Try SSH once and check whether the error includes publickey |
| Vault entry is old and the password was rotated | Common | In the vault, open the item and compare its "Last updated" time with the server password reset time in your provider dashboard |
| Password was copied with an extra space, line break, or wrong field | Common | Paste the password into a plain text editor and verify there is no leading/trailing whitespace |
| Account is locked, expired, or requires a reset | Less common | In your provider dashboard, open the server console and look for Account locked or repeated failed-login messages |
| You are logging into the wrong target entirely | Less common | Compare the server hostname/IP in the vault entry with the one you are connecting to |
Step-by-step diagnosis
- Confirm you are using the exact username from the vault
- In your vault, open the item and look for fields named Username, Login, or User.
- If you are using SSH from your computer, use this exact format:
ssh username@server-ip
- What means "this is your problem": the vault password works only after changing the username, or you notice you were trying
rootwhile the vault saysubuntu,ec2-user,admin, or an app-specific user. - Jump to Fixes → Wrong username for the password.
- Check whether the server expects SSH key login instead of password login
- From your computer, try one SSH connection and read the final error line:
ssh username@server-ip
- What means "this is your problem": you see
Permission denied (publickey)orPermission denied (publickey,password)and your provider documentation or team notes say the server is key-based. - If you do not have terminal access, check your provider dashboard for the server's access section (for example, in your provider's dashboard: server/instance page → Access, Security, or SSH Keys).
- Jump to Fixes → Server does not allow password login.
- Verify you copied the password correctly
- Copy the password from the vault and paste it into a plain text editor first, not directly into the login prompt.
- If your vault has both a password field and a notes field, copy only the password field.
- For a quick local check on Linux or macOS, this command shows whether your clipboard ends with a hidden newline:
printf '%s' "$(pbpaste 2>/dev/null || xclip -o -selection clipboard 2>/dev/null)" | hexdump -C | tail -n 1
- What means "this is your problem": you find a trailing space, line break, smart quote, or you were copying from a note instead of the password field.
- Jump to Fixes → Password was copied with an extra space, line break, or wrong field.
- Confirm the vault entry matches the exact server you are trying to reach
- Compare the vault item's hostname/IP with the target in your terminal or dashboard.
- If using SSH, print the destination you are using:
echo server-ip-or-hostname
- What means "this is your problem": the vault item says
prod-web-01but you are connecting toprod-db-01, or the IP address changed after a rebuild. - Jump to Fixes → You are logging into the wrong target entirely.
- Check whether the password in the vault is stale
- In the vault item, note the Last updated time.
- Then in your provider dashboard, open the server page and check the activity/audit area for password reset, rebuild, or user-data changes. If your provider UI differs, look in the instance page for Events, Activity, or Audit log.
- If you have console access and another working login method, test the credentials directly:
su - username
- What means "this is your problem": the password was reset after the vault item was last updated, or another admin confirms a recent rotation.
- Jump to Fixes → Vault entry is old and the password was rotated.
- Use the server console to check for lockout or expiry
- In your provider dashboard, open the instance's web/VNC/serial console (names vary by provider; look for Console, Serial console, or Web console on the server page).
- If you can log in there with another admin account, run:
sudo passwd -S username
sudo faillock --user username 2>/dev/null || sudo pam_tally2 --user username 2>/dev/null
- What means "this is your problem": output shows the account is locked, expired, or has many failed attempts.
- Jump to Fixes → Account is locked, expired, or requires a reset.
Fixes
Wrong username for the password
Use the username stored with the secret, not a guessed default.
- Common Linux examples:
- Ubuntu images often use
ubuntu - Amazon Linux often uses
ec2-user - Debian often uses
adminor a custom user
- Ubuntu images often use
- Retry with the exact username:
ssh exact-username@server-ip
- For database logins, pass the exact user from the vault:
psql -h db-host -U exact_username -d database_name
mysql -h db-host -u exact_username -p
- Verify it worked: you reach a shell prompt or the database prompt without an authentication error.
Server does not allow password login
If password authentication is disabled, the vault password is not the right login method. Use an SSH key or enable password login temporarily if your agency approves it.
- First try your SSH key:
ssh -i ~/.ssh/your_key exact-username@server-ip
- If you already have another admin path into the server and need to enable password login temporarily:
⚠️ Enabling password login can increase attack risk. Do this only if your agency has approved it, and disable it again after access is restored.
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo sed -i 's/^#\?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl reload sshd || sudo systemctl reload ssh
- If the user has no password set, set one:
sudo passwd exact-username
- Verify it worked: this command prompts once and then opens a shell:
ssh exact-username@server-ip
Vault entry is old and the password was rotated
Update the server password, then update the vault immediately so the next login attempt uses the current secret.
- If you have console access or another admin login method, reset the password:
sudo passwd exact-username
- Then edit the vault item and replace the old password with the new one. If your vault supports a Generate password button, use it and save the item.
- If this is a database user, reset it in the database instead:
sudo -u postgres psql -c "ALTER USER exact_username WITH PASSWORD 'NewStrongPasswordHere';"
mysql -e "ALTER USER 'exact_username'@'%' IDENTIFIED BY 'NewStrongPasswordHere'; FLUSH PRIVILEGES;"
- Verify it worked: log in successfully once with the new password, then ask a teammate to open the same vault item and confirm they see the updated value.
Password was copied with an extra space, line break, or wrong field
Copy only the password field, and use paste carefully.
- Paste the password into a plain text editor and remove any leading/trailing spaces.
- If the vault has a reveal/copy button for the password field, use that instead of selecting text manually.
- On Linux/macOS, trim clipboard whitespace before using it:
printf '%s' "$(pbpaste 2>/dev/null || xclip -o -selection clipboard 2>/dev/null)" | tr -d '\r' | sed 's/[[:space:]]*$//'
- Then paste the cleaned value into the login prompt.
- Verify it worked: the same username and target now accept the password without changing anything else.
Account is locked, expired, or requires a reset
Unlock the account or reset the password age policy.
⚠️ Changing account policy can affect security controls. If this is a production server managed by your agency, record the change in your ticket or change log.
- Unlock a Linux user:
sudo passwd -u exact-username
- Reset failed-login counters:
sudo faillock --user exact-username --reset 2>/dev/null || sudo pam_tally2 --user exact-username --reset 2>/dev/null
- Remove password expiry for immediate access, or set a new max age:
sudo chage -M 90 exact-username
sudo chage -l exact-username
- Set a fresh password if needed:
sudo passwd exact-username
- Verify it worked:
sudo passwd -S exact-usernameno longer shows a locked state, and the user can log in.
You are logging into the wrong target entirely
Point your login at the server named in the vault entry.
- Compare and correct the hostname/IP in your SSH command:
ssh exact-username@correct-server-ip
- If the server was rebuilt and got a new IP, update the vault item title and hostname field so it matches reality.
- If you use an SSH config file, inspect the saved host mapping:
grep -A 5 -n "Host your-alias" ~/.ssh/config
- Verify it worked: the corrected target accepts the credentials, and the hostname shown after login matches the intended server:
hostname
Prevention
- Store username, hostname, and login method in the same vault item. Use fields like
username,hostname, andauth methodso nobody guesses. Example note template:
Username: ubuntu
Hostname: 203.0.113.10
Auth method: SSH key only
Fallback console: provider web console
Last rotated: 2026-08-05 by Alex
- Rotate passwords and update the vault in one change step. Put this in your change checklist:
1. Reset password
2. Test login once
3. Update vault item
4. Ask second person to verify vault item opens and shows new timestamp
- Prefer SSH keys for server access and reserve passwords for break-glass use. Generate a key pair and add the public key through your provider dashboard or the server:
ssh-keygen -t ed25519 -C "your.name@company"
ssh-copy-id exact-username@server-ip
- Add a post-rotation login test to CI or ops automation. After changing a secret, run a non-destructive login check from your automation host:
ssh -o BatchMode=yes -o ConnectTimeout=5 exact-username@server-ip 'echo ok'
- Monitor failed logins so lockouts are visible early. On Linux with systemd (service manager), watch auth logs:
sudo journalctl -u ssh -n 50 --no-pager
sudo journalctl _COMM=sshd --since "1 hour ago" --no-pager | grep -Ei "Failed password|authentication failure|invalid user"
- Pin the expected login user in your connection shortcuts. In
~/.ssh/config, save the right username with the host so you do not accidentally tryrootor another default:
Host prod-web-01
HostName 203.0.113.10
User ubuntu
IdentityFile ~/.ssh/your_key
This article was written by an AI system and published pending human review. Verify anything you intend to act on.
Have a project in mind?
Get an instant AI price estimate for it, or talk directly to our team.
One email a month on what we learn building with AI