Skip to content

NAS-143402 / 26.0.0 / Stricter user SSH public key validation to match OpenSSH behavior - #19652

Merged
yocalebo merged 1 commit into
stable/26from
NAS-143402
Sep 15, 2026
Merged

yocalebo merged 1 commit into
stable/26from
NAS-143402

Conversation

@themylogin

@themylogin themylogin commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

sshd opens the authorized_keys file as the user itself, so every directory leading to the home directory has to
be traversable by the account.

On top of that StrictModes makes sshd refuse to use the file when the home directory is world-writable or is
owned neither by the user nor by root.

A public key that is stored under any of those conditions silently never authenticates anyone, so it should be rejected up front.

@bugclerk bugclerk changed the title Stricter user SSH public key validation to match OpenSSH behavior NAS-143402 / 26.0.0 / Stricter user SSH public key validation to match OpenSSH behavior Sep 8, 2026
@bugclerk

bugclerk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@themylogin

themylogin commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

@themylogin

Copy link
Copy Markdown
Contributor Author

time 2:00

@yocalebo
yocalebo merged commit daf7530 into stable/26 Sep 15, 2026
4 checks passed
@yocalebo
yocalebo deleted the NAS-143402 branch September 15, 2026 14:13
@bugclerk

Copy link
Copy Markdown
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Sep 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants