OCI : Does SSHD Service Restart Affect Current Active SSH Sessions
Applies to:
Oracle Cloud Infrastructure - Version N/A and laterLinux x86-64
Goal
Need to know whether SSHD Service restart after making changes to sshd configuration will affect the current active SSH sessions
Solution
Restarting the SSHD service doesn't affect the current active SSH sessions, as it only kills and restarts the sshd main process. SSHD forks a child process on connection, these child process will not die if SSHD is restarted.
As per systemd unit file since sshd.service set KillMode=process, hence only the main process /usr/sbin/sshd gets killed on SSHD restart
[root@xxxx ~]# cat /usr/lib/systemd/system/sshd.service
Tagged:
0