Over ssh, sudo reboot; logout is not always working as expected. Why?
When working over ssh, I sometimes want to reboot or power off a system. The usual error message about the broken pipe annoy me, so I use
sudo reboot; logout as a stop for it. The interesting issue is that it doesn't work on all systems. A sixth gen Intel NUC works, but on an 11th gen Intel CPU I get the same errors as if I didn't issue the logout:
Broadcast message from root@NUC11TNKi3 on pts/1 (Thu 2026-05-21 11:38:21 CEST):
The system will power off now!
Read from remote host nuc11tnki3.lan: Connection reset by peer
Connection to nuc11tnki3.lan closed.
client_loop: send disconnect: Broken pipe
On a 10th gen Intel NUC, it's no issue:
sudo reboot; logout
Broadcast message from root@nuc10i3fnk on pts/2 (Thu 2026-05-21 11:58:15 CEST):
The system will reboot now!
Connection to nuc10i3fnk.lan closed.
It should have something to do with the timing (that's why I post it in /r/bash), but I can't identify why only some systems show it. I use it on some fast systems and on slow systems without problems. Bash version is 5.3.9 in case it plays a role. But I have used other systems with other bash versions as well.