The officially official Devuan Forum!

You are not logged in.

#1 2024-08-12 05:33:43

jonny101
Member
Registered: 2024-06-20
Posts: 8  

[SOLVED] uncomplete SSH disconnect on reboot

Hi everybody,

I've got the following SSH issue bugging me when rebooting my Devuan 5 machine.

devuan@DevuanRpi:~$ sudo reboot 

Broadcast message from root@DevuanRpi (pts/1) (Mon Aug 12 07:02:06 2024):

The system is going down for reboot NOW!

Broadcast message from root@DevuanRpi (pts/1) (Mon Aug 12 07:02:06 2024):

The system is going down for reboot NOW!
devuan@DevuanRpi:~$ █

It seems as if the reboot proceeds faster than the SSH service is able to logout - thus my terminal becomes unresponsive for 15+ minutes.
Now it is not that big of a disturbance but quite an annoyance. Besides I would like to understand the reason for this.

Could somebody help me please?

Offline

#2 2024-08-12 06:12:03

quickfur
Member
Registered: 2023-12-14
Posts: 394  

Re: [SOLVED] uncomplete SSH disconnect on reboot

Couldn't you just type ~. to forcefully disconnect the ssh client? (That's tilde followed by period.)

Offline

#3 2024-08-12 06:23:49

jonny101
Member
Registered: 2024-06-20
Posts: 8  

Re: [SOLVED] uncomplete SSH disconnect on reboot

Unfortunately I can't type anything because the console becomes unresponsive. So the only options I have are:

a. close that terminal and start a new one or
b. wait for that session to time-out (which gives me a client_loop: send disconnect: Broken pipe error afterwards.

Although I'm not very familiar with init.d my guess is that I need to change something in the way the services are shutdown (maybe the order) but I don't know where to start.

Offline

#4 2024-08-12 07:16:17

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,224  

Re: [SOLVED] uncomplete SSH disconnect on reboot

how about using

sudo reboot ; exit

Offline

#5 2024-08-12 08:01:08

jonny101
Member
Registered: 2024-06-20
Posts: 8  

Re: [SOLVED] uncomplete SSH disconnect on reboot

@ralph.ronnquist That did the trick! big_smile Thanks a lot! I will make an alias with this one...

Offline

#6 2024-08-14 22:10:38

Matlib
Member
Registered: 2022-08-25
Posts: 7  
Website

Re: [SOLVED] uncomplete SSH disconnect on reboot

Actually it's Enter ~ ., although Enter is usually the last key pressed.

If the network gets deconfigured for some reason (for example dhcpcd killed) before sshd is terminated, then the system has no chance to properly close the connection.

AIX has a nice feature that redirects console output to the ssh session that initiated shutdown, so you can see rc messages when the system is shutting down.

Last edited by Matlib (2024-08-14 22:16:24)

Offline

Board footer