i do remember making this
@Dee ssh connections survive that though?

@Dee

[leo60228@penumbra:~]$ ssh leoservices

[leo60228@leoservices:~]$ sudo systemctl restart sshd

[leo60228@leoservices:~]$ exit
logout
Connection to leoservices closed.

[leo60228@penumbra:~]$
@leo fair enough
@Dee While I 100% agree with @leo on the current landscape of that functionality, I do seem to recall a time when restarting sshd killed off your active session (which was usually fine unless it failed to start again πŸ‘€).
@leo @Dee I assume the reference is if someone edits their sshd config and makes a mistake so when it tries to start again it fails and does not start, so you can't remote into it using SSH again (quite the inconvenience depending on where it is located)

@leo @Dee

why take the chance?
`systemctl restart sshd & exit`
might as well fork so you can restart sshd and exit at the same time.

@loganer @leo @Dee Reminds me when the phone carrier is like please restart your phone to fix the problem but I'm talking to you on the phone....
@Dee ifconfig restart eth0 enters the chat

@Dee I...I feel like that's new behavior?

Either that or the last time I did that was "/etc/init.d/sshd restart" >.> Oop

@Dee won't happen if you use socket-activated per-connection instance units.
@Dee haha, another fun one is restarting the D-Bus service for the system bus :P
@Dee note that this does not actually kill active sessions :P
@[email protected] I may have done a systemctl stop [email protected] without really thinking about it and it took me a few seconds after pressing enter to understand why my shell wasn't responding anymore ​​ "well I guess my ssh was going through it after all"
@louis @Dee I've done:
`systemctl [email protected]; systemctl start [email protected]`
And after a brief scary period it has recovered. (But I've also had it fail to recover any time I had a typo.)
@poleguy I still do it to this day, but now I have made sure that I always have another way to access the machine, even when it's fully offline ​​

(Also, there is a typo in your stop command)

@[email protected]

@louis @Dee The typo in the stop command is not as important as the typo in the wg0.conf file that you can imagine. :-)

And yes, the wireguard is always a secondary connection. I can always still VPN in through more 'official' channels. :-)

@Dee i remember setting up a firewall and forgot to open the ssh port

@Dee this is why i always keep a separate shell open :p

… unless systemd also kills all existing processes. it’s been a while since i had to touch it

@domi @Dee last time i did this my ssh session survived
@weirdtreething @Dee (the separate shell open is just in case sshd fails to start and i accidentally press ^D. feels safer having two of them. same with editing doas.conf)
@Dee `sudo /etc/init.d/sshd reload`, no?
@Dee The other day, I learned about "systemctl exit". That was fun!

@Dee Why are my terminal connections dead?

Ohhh yeah.

@Dee this but it's ip link set dev eth0 down
@Dee while that's a funny meme, others have pointed out that ssh doesn't work that way, but the old ifup/ifdown scripts totally did, if you tried `sudo /sbin/service networking restart` which would do an `ifdown eth0 && ifup eth0` with scripts, prepare to have the whole thing quit when your ssh get SIGHUP and the ifup never happening unless you run it in screen which creates its own process group. We've all sawed our legs off once ...