I have noticed that when I issue a reboot
command, my SSH connection is immediately closed on CentOS 7. It does not mean the server has rebooted, as I can still ping it.
It seems systemd is killing sshd too early. Sometimes a service will get stuck shutting down or just be slow, and I can't login anymore to verify what is wrong even though the server is up.
Is there a way to tell systemd to only kill sshd after all other service are down?