| Summary: | .ssh/authorized_keys2 working accoding to response to a previous PR | ||
|---|---|---|---|
| Product: | Base System | Reporter: | doug |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | emaste, markj |
| Priority: | --- | ||
| Version: | 12.1-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
| See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248439 | ||
|
Description
doug
2020-08-26 05:11:12 UTC
Hi, I'm sorry for closing PR 248439 abruptly - I should have waited longer for feedback. Per that PR, the default sshd in 12.1 configuration will ignore authorized_keys2. 12.1 sets "AuthorizedKeysFile .ssh/authorized_keys" in /etc/ssh/sshd_config, i.e., it overrides OpenSSH's default. This seems to match the behaviour you are describing. Are you using a non-default configuration? As far as I can tell your example functions as expected: you cannot connect with keys in .ssh/authorized_keys2, and can with keys in .ssh/authorized_keys.
Again, from sshd(8):
> AuthorizedKeysFile specifies the files containing public keys for public
> key authentication; if this option is not specified, the default is
> ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2.
But the option *is* specified in the default /etc/sshd_config file:
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
If have no AuthorizedKeysFile setting in your sshd configuration the compiled-in default is ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. If you *do* have an AuthorizedKeysFile in your sshd configuration (/etc/ssh/sshd_config) that takes precedence over the default compiled into sshd.
Closing as no feedback was received in response to comment #1. |