maybe it is documented somewhere and I missed it, but to disable
password login on an ssh server it is not sufficient to specify
UsePAM=no (which is the default) in /etc/ssh/sshd_config because it is enabled by the /etc/ssh/sshd_config.d/9999999gentoo-pam.conf, so you
need to comment out 'UsePAM=yes' in there.
On Thursday, 20 March 2025 19:03:49 Greenwich Mean Time ralfconn wrote:
maybe it is documented somewhere and I missed it, but to disable
password login on an ssh server it is not sufficient to specify
UsePAM=no (which is the default) in /etc/ssh/sshd_config because it is
enabled by the /etc/ssh/sshd_config.d/9999999gentoo-pam.conf, so you
need to comment out 'UsePAM=yes' in there.
See https://wiki.gentoo.org/wiki/SSH#Passwordless_authentication_to_a_distant_SSH_server
On Mar 22, 2025, at 18:50, Nate Eldredge <[email protected]> wrote:sufficient to disable password login. On other distributions it is actually true, but on gentoo it is a lie.
On my Ubuntu box, which also doesn't have AuthenticationMethods set in sshd_config, simply setting "PasswordAuthentication no" does in fact prevent password login.
Moreover, the stock sshd_config has a comment above the PasswordAuthentication option saying "To disable tunneled clear text passwords, change to no here!" I think that would strongly suggest to the average user that changing this to "no" is
I agree that this behavior is surprising and fairly dangerous, and would suggest that it be changed.
On Mar 22, 2025, at 18:37, Alexis <[email protected]> wrote:
ralfconn <[email protected]> writes:
Setting "PasswordAuthentication no" is not sufficient.
If you fail key authentication e.g. by pressing <enter> at the
passphrase prompt you'll be prompted for the password unless you do
the above.
That's controlled by the AuthenticationMethods parameter, which has a
default value of "any". Refer to sshd_config(5) for further information.
(Note that the default sshd_config file doesn't contain all available
options.)
Alexis.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 155:49:40 |
| Calls: | 12,092 |
| Files: | 15,000 |
| Messages: | 6,517,715 |