Page MenuHomeFreeBSD

freebsd-update: restart sshd after upgrade
ClosedPublic

Authored by emaste on May 2 2022, 5:19 PM.
Tags
None
Referenced Files
F102468764: D35109.diff
Tue, Nov 12, 5:25 PM
Unknown Object (File)
Wed, Oct 23, 1:40 AM
Unknown Object (File)
Sun, Oct 20, 3:16 PM
Unknown Object (File)
Oct 1 2024, 3:57 PM
Unknown Object (File)
Sep 30 2024, 11:10 PM
Unknown Object (File)
Sep 29 2024, 8:42 AM
Unknown Object (File)
Sep 22 2024, 6:39 PM
Unknown Object (File)
Sep 18 2024, 10:25 PM
Subscribers

Details

Summary

Sometimes the parent-child sshd protocol changes during an upgrade, and
when this happens sshd will not accept new connections until it is
restarted.

PR: 263489

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.May 2 2022, 5:19 PM
emaste created this revision.
This revision is now accepted and ready to land.May 2 2022, 5:26 PM

Dumb question, I'm sure, but doesn't restarting sshd kill current ssh sessions?

Dumb question, I'm sure, but doesn't restarting sshd kill current ssh sessions?

Not a dumb question! It does not. The parent sshd process restarts, but it does not kill any of the children handling already-accepted connections.

Will change the comment to

# Restart sshd if running (PR263489).  Note that this does not
# affect child sshd processes handling existing sessions.

Dumb question, I'm sure, but doesn't restarting sshd kill current ssh sessions?

Not a dumb question! It does not. The parent sshd process restarts, but it does not kill any of the children handling already-accepted connections.

Right. The only time I have ever seen sshd terminate an active connection is when reloading pf(4) rules or restarting pf(4).

Thanks! I was having nightmares of ssh sessions being terminated and leaving people with half-upgraded systems which they couldn't ssh into.

Right. The only time I have ever seen sshd terminate an active connection is when reloading pf(4) rules or restarting pf(4).

Ah, that's probably what I was thinking of. I know I've locked myself out of a system in the past by trying to restart something, and now I'm forever paranoid.

This revision was automatically updated to reflect the committed changes.