Skip to content

Conversation

@marcoieni
Copy link
Member

@marcoieni marcoieni commented Jan 30, 2026

If we don't run sudo systemctl restart ssh, I can't ssh from my user.

AI review

Standard behavior for authorized_keys
In ansible/roles/common/tasks/ssh.yml:
Standard sshd behavior is to read the AuthorizedKeysFile path upon every connection attempt. It is highly unusual to require a service restart for updated keys to take effect.

While this might solve the symptom described, double-check if permissions or SELinux contexts on the /etc/ssh/authorized_keys/ directory are correct, as those are more
likely root causes for keys not being accepted immediately.

My response to AI review

Probably we should check what AI suggests, but I'm not doing this because from my test reloading ssh worked.

@marcoieni marcoieni force-pushed the restart-ssh-after-keys-are-updated branch from 62b7b40 to 4dcfce6 Compare January 30, 2026 15:32
@marcoieni marcoieni marked this pull request as ready for review January 30, 2026 15:34
@marcoieni marcoieni merged commit cb064c9 into master Jan 30, 2026
4 checks passed
@marcoieni marcoieni deleted the restart-ssh-after-keys-are-updated branch January 30, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant