SSH Password Authentication Enabled
The SSH server accepts password logins, so every account that can use SSH is open to password guessing and relies on the strength of a single password.
| Severity | Medium |
| CVSS 3.1 | 5.6 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L Open in the calculator |
| CVSS 4.0 | 6.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-309: Use of Password System for Primary Authentication |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1110.001 Password Guessing, T1110.003 Password Spraying, T1021.004 SSH |
| Category | Security Misconfiguration |
Description
The SSH server allows users to authenticate with a password, through the password method, the keyboard-interactive method or both. Every account that can log in over SSH is then protected by a single factor that can be guessed, reused from another breach or captured elsewhere, rather than by a private key that never leaves the user's device.
An attacker who can reach the service can try to guess passwords for known or likely account names, use passwords exposed in other breaches, or spray common passwords across many accounts. A successful guess gives an interactive shell with that account's privileges, from which the attacker can read data, move to other systems and attempt privilege escalation.
The likelihood depends on the strength of account passwords, any lockout or rate limiting in place, and whether the service is exposed to the internet: SSH servers reachable from the internet receive automated password guessing almost continuously, and internal servers are a common target for password spraying once an attacker has a foothold on the network. Accounts with weak or default passwords, and service accounts whose passwords are rarely changed, are the usual way in.
The methods a server accepts are disclosed before authentication, so the issue can be confirmed without credentials: the Nmap ssh-auth-methods script, or ssh -v run against the server, lists them, for example publickey,password,keyboard-interactive. On most Linux systems keyboard-interactive asks for the same password through PAM, so disabling only the password method can leave password logins possible.
Remediation
Require key-based or certificate-based authentication and turn off password logins:
- Issue each administrator their own key pair, protected by a passphrase or held on a hardware token, and install the public keys before making the change.
- In
sshd_config, setPasswordAuthentication noandKbdInteractiveAuthentication no(ChallengeResponseAuthentication noon older releases), or setAuthenticationMethods publickey, then reload the service. - Check files included from
/etc/ssh/sshd_config.d/, such as those added by cloud images: OpenSSH uses the first value it reads for most directives, so an earlierPasswordAuthentication yestakes precedence.sshd -Tprints the settings in effect. - Where passwords must remain for some users, add a second factor through PAM and require both with
AuthenticationMethods, or allow passwords only from a management network inside aMatch Addressblock.
As interim measures, restrict SSH to VPN or management networks with a firewall, enforce strong passwords, and block sources that repeatedly fail to log in, for example with fail2ban. Confirm the fix with the ssh-auth-methods script or ssh -v, which should list only publickey.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.