Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
SSH not terminating the client when rebooting
SSH not terminating the client when rebooting
Hi all,
I find the most annoying new "feature" of the b3 is sshd failing to tell the clients to terminate the connection.
If I issue the shutdown or reboot command on bubba2 (or any other linux host) the ssh client will be notified that the connection is lost. If I do the same on b3, the client will just hang until I kill it.
Any ideas on how to make it behave?
Thanks,
Cheeseboy
I find the most annoying new "feature" of the b3 is sshd failing to tell the clients to terminate the connection.
If I issue the shutdown or reboot command on bubba2 (or any other linux host) the ssh client will be notified that the connection is lost. If I do the same on b3, the client will just hang until I kill it.
Any ideas on how to make it behave?
Thanks,
Cheeseboy
Re: SSH not terminating the client when rebooting
So, when you disconnect the cable to the bubba2 server and leave the B3 client hanging for a few min, and then plug the B2 back in again, do you get to keep your connection?
Re: SSH not terminating the client when rebooting
Yes.
SSH has built-in cleverness that lets it resume a broken connection.
But this is beside the point, when the server knows it is going down, the sshd normally terminates the client.
This does not happen on the b3.
SSH has built-in cleverness that lets it resume a broken connection.
But this is beside the point, when the server knows it is going down, the sshd normally terminates the client.
This does not happen on the b3.
Re: SSH not terminating the client when rebooting
I just tried it on mine and it works just like it should. I get:
So whatever problem your having seems to be not systemic for the B3 config
Code: Select all
Connection to 192.168.0.40 closed by remote host.
Connection to 192.168.0.40 closed.
Re: SSH not terminating the client when rebooting
Did you actually reboot your b3?
bubba2 behaviour:
b3 behaviour:
The client then hangs indefinitely.
It does not recover the connection when the b3 comes up again. I do not expect it to do so, I just want the client to be notified about the imminent reboot and disconnect.
bubba2 behaviour:
Code: Select all
niklas@bubba2:~$ sudo reboot
Password:
Broadcast message from root@bubba2 (pts/0) (Sat Dec 4 13:08:39 2010):
The system is going down for reboot NOW!
niklas@bubba2:~$ Connection to bubba2 closed by remote host.
Connection to bubba2 closed.
Code: Select all
niklas@b3:~$ sudo reboot
[sudo] password for niklas:
Broadcast message from root@b3 (pts/0) (Sat Dec 4 13:11:48 2010):
The system is going down for reboot NOW!
niklas@b3:~$
It does not recover the connection when the b3 comes up again. I do not expect it to do so, I just want the client to be notified about the imminent reboot and disconnect.
Re: SSH not terminating the client when rebooting
well.... no because the b3 was the client right? I rebooted the server B1. And then when the server B1 shuts down SSHD and closes the network interfaces, the B3 client gets a warning as I displayed in my previous post and it drops me back into the shell of the client. So it does not hang but behaves as it should.Cheeseboy wrote:Did you actually reboot your b3?
Do you have any funny business in your /etc/ssh/ssh_config?
Re: SSH not terminating the client when rebooting
OK, you misunderstood my problem then.
It is when I connect to the b3 from other hosts and reboot the b3 that it misbehaves...
Comments removed:
Also:
Only comments as far as I can see...
It is when I connect to the b3 from other hosts and reboot the b3 that it misbehaves...
Nope, it is untouched by me and apt (I think... (it's timestamp is may 23 2010))Do you have any funny business in your /etc/ssh/ssh_config?
Comments removed:
Code: Select all
Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
Code: Select all
niklas@b3:~/sshtest$ diff ssh_config_b3 ssh_config_bubba2
27,30d26
< # GSSAPIAuthentication no
< # GSSAPIDelegateCredentials no
< # GSSAPIKeyExchange no
< # GSSAPITrustDNS no
42,43c38
< # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
< # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
---
> # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
48,49d42
< # VisualHostKey no
< # ProxyCommand ssh -q -W %h:%p gateway.example.com
Re: SSH not terminating the client when rebooting
ah so the B3 is the server. In that case we should be looking at sshd_config, not ssh_config
. I'll go and check what my behaviour is

Re: SSH not terminating the client when rebooting
Yop I can replicate the problem. When B3 is the server and is rebooted then the connected client (either SSH from another Bubba, or PuTTY from windows) never gets the message that the connection is gone and hangs forever.
Re: SSH not terminating the client when rebooting
THe sshd_config on the B1 and B3 are identical, suggesting the solution is not there.
Accoring to some other forums this is an issue of improper shutdown
https://bugs.archlinux.org/task/17389?string=when
Apparently the system does not shut down the network when it shuts down the machine. For some people that is useful behaviour (?). SOlution seems to be to explicitly drop connections in an rc.shutdown script.
Accoring to some other forums this is an issue of improper shutdown
https://bugs.archlinux.org/task/17389?string=when
Apparently the system does not shut down the network when it shuts down the machine. For some people that is useful behaviour (?). SOlution seems to be to explicitly drop connections in an rc.shutdown script.
Re: SSH not terminating the client when rebooting
Thanks for the research Ubi, I couldn't find anything. Obviously my search engine skills needs improving.
I'm depressed with what you found though: a bug report for archlinux that was fixed in June.
The proposed workarounds do not appeal. I would prefer a fix from the distro maintainer rather than messing about with the boot scripts...
Oh well. We have at least reported the problem (kinda, I'm not at all convinced that Excito monitors these fora)
Pizzatime!
I'm depressed with what you found though: a bug report for archlinux that was fixed in June.
The proposed workarounds do not appeal. I would prefer a fix from the distro maintainer rather than messing about with the boot scripts...
Oh well. We have at least reported the problem (kinda, I'm not at all convinced that Excito monitors these fora)
Pizzatime!
Re: SSH not terminating the client when rebooting
yeah I second that, but I'd rather see that Excito focuses on the B3 sudden-death issues than on this bug...