If SSH asks for the remote account password after you configured a key, the key authentication attempt either did not complete or the server deliberately requires another method. First identify which secret the prompt wants: a local private-key passphrase unlocks your encrypted key, while a remote password is supplied to the server. Run ssh -vvv to see which identity is offered, then verify the username, host, authorized-key path, permissions, and server authentication policy.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Two prompts that look similar but mean different things
SSH can request a secret from you for two unrelated reasons. The wording and timing of the prompt are the quickest clues.
As an Amazon Associate I earn from qualifying purchases.
| Prompt | Where the secret is used | What it usually means | Typical next action |
|---|---|---|---|
| Private-key passphrase | Your local SSH client | The private key is encrypted and must be unlocked before the client can use it. | Enter the passphrase you chose when creating the key, or load the key into an agent. |
| Remote account password | The SSH server | Public-key authentication was not accepted, or server policy requires password or keyboard-interactive authentication as another step. | Inspect the connection with verbose logging and check the server account, key path, permissions, and policy. |
SSH public-key authentication uses an asymmetric pair: a private key stays on the client and a corresponding public key is installed for the remote account. The server validates that the client can prove possession of the matching private key. A passphrase protects the private key file; it is not the password for the server account.
What the password fallback tells you
A remote password prompt means the server has offered password or keyboard-interactive authentication, or that a multi-step rule has reached that stage. It does not, by itself, prove that your key is absent. The key may have been offered and accepted as the first factor while the server waits for a second factor, such as a password.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
If the server is intended to allow key-only login, a password prompt normally indicates a failure somewhere in the key path:
- The command uses the wrong username or hostname.
- The client is offering a different key than the one installed on the server.
- The private key cannot be read, is not loaded in the agent, or is protected by a passphrase you have not entered.
- The public key is installed for another account or on another server.
- The server is looking in a different
AuthorizedKeysFileor obtaining keys through anAuthorizedKeysCommand. - Ownership or permissions on the home directory,
.ssh, orauthorized_keyscause the daemon to ignore the file. - Server policy disables public-key authentication or requires an additional method.
Step 1: identify the exact connection and key being used
Run the connection with maximum client-side verbosity and explicitly name the private key:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →ssh -vvv -i ~/.ssh/id_ed25519 [email protected]
Replace the path, username, and hostname with the values for your connection. The debug output should let you confirm:
- the username SSH is actually sending;
- the hostname and resulting destination you intended;
- which identity files the client considers;
- whether the intended public key is offered to the server; and
- the point at which the server accepts, rejects, or moves on to another method.
If your key has another filename, use that exact path with -i. You can make the choice persistent in the client configuration by defining the host, username, and identity file in ~/.ssh/config. A verbose run is more useful than guessing because it separates “the client never offered this key” from “the server rejected a key that was offered.”
When the log shows the wrong identity
Multiple keys are common on a workstation. An agent may contain several identities, or the default filenames may not include the key you created. If the debug trace never offers the intended key, point SSH at it with -i, load it into the agent, or set the identity in ~/.ssh/config. Keep the private key on the client; only its matching public key belongs on the server.
When the private key cannot be used
A private key that is unreadable, inaccessible to your user, or still locked by its passphrase cannot produce the proof the server needs. Correct the local file access or unlock the key, then repeat the same verbose command. Do not copy a private key to the server to “make the pair match”; the server needs only the public half.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Step 2: verify the remote username and host before touching files
The public key is authorized per account. A key installed under /home/alice does not authenticate a connection made as bob, even on the same machine. Likewise, a key placed on one server cannot authenticate you to a different host that happens to have a similar name.
Compare the command’s user@host with the account and server where you installed the key. A typo in either part can produce a completely legitimate password prompt from the wrong destination.
Step 3: check the server’s effective authorized-key location
OpenSSH reads user public keys from the path defined by AuthorizedKeysFile. Its documented default is:
.ssh/authorized_keys .ssh/authorized_keys2
These relative paths are resolved from the target user’s home directory unless the server configuration specifies an absolute path or another location. Therefore, the key must be installed for the same account named in your SSH command, in that account’s effective home directory.
Rank #2
- Ultra-Compact FIDO2 Security Key - Plug-and-stay or carry on a keychain. This USB-A hardware security key offers portable, always-on protection for desktop and mobile use. (Item Size: 0.75 X 0.74 IN x 0.25 IN)
- USB-A Hardware Key for All Devices - Works with USB-A ports on PC, Mac, Android, and other laptop/notebook device. Enables secure, cross-platform login with FIDO2.0 passkey support.
- FIDO Certified Security Key - Meets FIDO and FIDO2 standards. Works with Google, Microsoft, GitHub, Dropbox, and more. Please check service compatibility before purchase.
- Passwordless Login with Passkey - Supports passkey login via WebAuthn and CTAP2. Enjoy password-free sign-ins where supported. Not all websites or services currently support passkeys.
- Advanced Multi-Factor Authentication - Offers 200 FIDO2 passkey slots and 50 OATH-TOTP slots. Strong, flexible 2FA/MFA support across various apps and authentication platforms.
Do not assume the default is active. Server configuration can change it, include other files, apply account- or group-specific Match rules, or use AuthorizedKeysCommand to obtain keys dynamically. Check the effective configuration rather than only the main file you happen to open.
- Confirm the public-key line is present in the file the daemon actually reads.
- Confirm it is under the correct user’s home directory.
- Confirm the line is intact: a wrapped, truncated, or altered key is a different key.
- If keys are supplied by an
AuthorizedKeysCommand, verify that command and its account-specific output instead of editing a local file that the server never consults.
Step 4: correct ownership and permissions without guessing
OpenSSH can reject an otherwise correct key when the path is considered unsafe. Ubuntu’s SSH troubleshooting guidance specifically calls out overly open permissions on the home directory, .ssh, or authorized_keys. The daemon must be able to reach the file while preventing other users from replacing or modifying it.
Use the ownership and restrictive permission scheme documented for your operating system and local policy. The home directory and .ssh directory should belong to the target account (or the platform’s approved administrative owner), and authorized_keys must not be writable by unrelated users. Avoid blindly applying a numeric mode copied from another system: a mode that is appropriate for one installation can conflict with a distribution’s ownership model or centralized access controls.
After correcting the path, ownership, or permissions, rerun the same ssh -vvv command. If the server still skips the key, continue to policy checks rather than repeatedly changing file modes.
Step 5: inspect the server’s effective authentication policy
The daemon can be configured to allow public keys, passwords, keyboard-interactive authentication, or combinations of them. The available OpenSSH methods include publickey, password, and keyboard-interactive, among others.
Review the active configuration, included files, and any Match blocks for the account and source address. In particular, establish:
PubkeyAuthenticationis enabled for this connection.AuthorizedKeysFilepoints to the location where the public key was installed, unless anAuthorizedKeysCommandis intentionally supplying it.- No account- or group-specific rule selects a different key path or authentication set.
AuthenticationMethodsdoes not intentionally require a password or keyboard-interactive step after the key.
If you administer the server, validate configuration changes before restarting the SSH service. Keep password authentication available and open a second session while testing key login. Only disable password fallback after a new key-authenticated session has succeeded; otherwise a small path or permission mistake can lock out every administrator.
Why a key can succeed and a password prompt can still be expected
AuthenticationMethods can require a sequence such as:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11AuthenticationMethods publickey,password
With that policy, the server must complete both methods in order. The key proves possession of the private key, and the password supplies the second factor. A password prompt at that point is the intended security control, not evidence that the key was ignored.
Each method named in an AuthenticationMethods rule must also be enabled in the server configuration. If a policy uses keyboard-interactive rather than password, the prompt may be generated by a keyboard-interactive mechanism even though it looks like a normal password request.
Rank #3
- Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
- Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
- Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
- Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
- For the driver download and user guide, please visit TrustKey Solutions Home support page.
| Observed behavior | Most likely layer | Interpretation |
|---|---|---|
| No intended key appears in verbose output | Client identity selection | The client is using another filename, an agent without the key, or a key it cannot read. |
| Intended key is offered but rejected | Server lookup or account mapping | The server cannot find that public key for this user, or the key path is unsafe. |
| Key is accepted, then another prompt appears | Authentication policy | A rule requires an additional password or keyboard-interactive method. |
| Password prompt comes from an unexpected destination | Connection identity | The username or hostname may not be the account and host where the key was installed. |
Windows OpenSSH: paths and ACLs differ
Windows OpenSSH has platform-specific locations and access-control requirements. Microsoft documents %programdata%sshsshd_config as the default server configuration file. Changes to that file require restarting the sshd service before they take effect.
Standard user accounts
For a normal user, the public key is normally placed in the user profile’s .sshauthorized_keys. Make sure the profile belongs to the account named in the SSH command and that the file contains the complete public-key line.
Free tools Windows power users keep installed
One-click scans. No signup required.
Administrator accounts
Members of the Windows Administrators group may use %programdata%/ssh/administrators_authorized_keys instead of the per-user file. Microsoft specifies restrictive ACL entries for SYSTEM and BUILTINAdministrators on that file. An ACL that grants broad write access can cause the server to reject the file or create a security exposure.
After changing Windows SSH configuration or the administrator key file’s ACLs, restart sshd as required, then test from a second connection. A client-side ssh -vvv run remains useful because it shows whether the key is offered; server-side path and ACL checks explain why it is accepted or rejected.
A complete, low-risk troubleshooting sequence
- Classify the prompt. Decide whether it asks for the local private-key passphrase or the remote account password. Do not change server files to solve a local passphrase prompt.
- Run a verbose, explicit test. Use
ssh -vvv -i /path/to/private_key user@hostand record the username, hostname, identities considered, and authentication method transition. - Confirm the destination. Verify that the host and account are exactly where the public key was installed.
- Confirm the key pair. Ensure the private key selected on the client corresponds to the public-key line installed for that account.
- Confirm the server lookup. Check the effective
AuthorizedKeysFile, any included configuration,Matchrules, and anyAuthorizedKeysCommand. - Confirm path safety. Correct ownership and restrictive permissions or ACLs on the home directory,
.ssh, and authorized-key file according to the platform’s guidance. - Check policy. Verify public-key authentication is enabled and determine whether
AuthenticationMethodsintentionally requires another factor. - Retest before hardening. Open a second session with the key. Only then consider disabling password authentication, and retain a recovery path appropriate to your environment.
Common fixes that do not solve the real problem
Copying the private key to the server
This reverses the security model. The client proves possession of the private key; the server needs only the public key. Keep the private key local and repair the authorized-key installation or client identity selection.
Changing permissions repeatedly without checking the path
Restrictive permissions cannot help if the key is under the wrong user, on the wrong host, or in a file that AuthorizedKeysFile does not reference. Establish the effective path first, then correct ownership and access controls.
Disabling password authentication immediately
This can turn a recoverable key-selection problem into a lockout. Test a new key-authenticated session while the existing session remains available, and change fallback policy only after success is demonstrated.
Assuming every password prompt means the key failed
A configured publickey,password sequence deliberately produces a password prompt after a successful key step. Inspect the verbose exchange and server policy before removing a security control.
Security choices after key login works
Once key authentication is reliable, decide whether the account should use one factor or more. Key-only access reduces reliance on a reusable account password, while a policy that combines publickey with password or keyboard-interactive provides an additional requirement. The correct choice depends on the threat model and the server’s operational requirements.
OpenSSH also supports security-key algorithms and controls such as touch-required and verify-required. Those options can require physical presence or verification when a hardware-backed key is used, but they do not repair an incorrect username, key path, ownership setting, or ACL. Fix the authentication path first, then choose any additional factor deliberately.
Recommended Free Tools
What the final diagnosis should say
An accurate diagnosis identifies both the prompt and the failing layer: local passphrase protection, client key selection, server key lookup, filesystem or ACL safety, or an intentional multi-factor policy. The same visible “password” question can represent any of these states, so the reliable method is to read the verbose client exchange and compare it with the server’s effective configuration for the exact account and host.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




