* [BUG] Openssh not closing connections on service stop
@ 2014-11-27 17:06 Diego
2014-12-03 0:13 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Diego @ 2014-11-27 17:06 UTC (permalink / raw)
To: openembedded-core
Hi all,
I'd like to share with you what I consider a bug.
I've generally noticed in my Linux experience that I get automatically
disconnected from an ssh session if the ssh host gets shutdown or rebooted
with the message:
Connection to x.y.w.z closed by remote host.
Connection to x.y.w.z closed.
This doesn't seem to happen on my OSes built on core-image-minimal with
openssh support.
Moreover I noticed that if I stop the ssh service:
# /etc/init.d/sshd stop
my ssh connections don't get dropped, I can continue using ssh session like
nothing happened. I can even see the connection process still up and running:
# ps | grep ssh
1790 root 4568 S /usr/sbin/sshd
1848 root 4852 S sshd: root@pts/0
1886 root 2896 S grep ssh
# /etc/init.d/sshd stop
Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1790)
.
# ps | grep ssh
1848 root 4852 S sshd: root@pts/0
1894 root 2892 S grep ssh
Isn't service termination supposed to stop all related connections at the same
time? Can anybody else reproduce (or not) this issue?
Bests,
Diego
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] Openssh not closing connections on service stop
2014-11-27 17:06 [BUG] Openssh not closing connections on service stop Diego
@ 2014-12-03 0:13 ` Saul Wold
2014-12-03 10:21 ` Diego
0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2014-12-03 0:13 UTC (permalink / raw)
To: Diego, openembedded-core
On 11/27/2014 09:06 AM, Diego wrote:
> Hi all,
>
> I'd like to share with you what I consider a bug.
>
> I've generally noticed in my Linux experience that I get automatically
> disconnected from an ssh session if the ssh host gets shutdown or rebooted
> with the message:
> Connection to x.y.w.z closed by remote host.
> Connection to x.y.w.z closed.
>
Well this is because the machine is actually shut down or halted,
therefore all processes get killed regardless, this is not necessarily a
function of stopping the daemon
> This doesn't seem to happen on my OSes built on core-image-minimal with
> openssh support.
>
> Moreover I noticed that if I stop the ssh service:
> # /etc/init.d/sshd stop
> my ssh connections don't get dropped, I can continue using ssh session like
> nothing happened. I can even see the connection process still up and running:
> # ps | grep ssh
> 1790 root 4568 S /usr/sbin/sshd
> 1848 root 4852 S sshd: root@pts/0
> 1886 root 2896 S grep ssh
> # /etc/init.d/sshd stop
> Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1790)
> .
> # ps | grep ssh
> 1848 root 4852 S sshd: root@pts/0
> 1894 root 2892 S grep ssh
>
> Isn't service termination supposed to stop all related connections at the same
> time? Can anybody else reproduce (or not) this issue?
>
It may actually be designed to work this way, since the daemon spawns a
process for each login the daemon can be restarted on a headless or
server type machine and not loose the connection, based on googling, I
could not find this outright on the Openssh.com site.
It appears that the dropbear sshd also has the behavior.
So I would not call this a bug.
Sau!
> Bests,
> Diego
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] Openssh not closing connections on service stop
2014-12-03 0:13 ` Saul Wold
@ 2014-12-03 10:21 ` Diego
0 siblings, 0 replies; 3+ messages in thread
From: Diego @ 2014-12-03 10:21 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
In data martedì 2 dicembre 2014 16:13:09, Saul Wold ha scritto:
> <snip>
>
> > Isn't service termination supposed to stop all related connections at the
> > same time? Can anybody else reproduce (or not) this issue?
>
> It may actually be designed to work this way, since the daemon spawns a
> process for each login the daemon can be restarted on a headless or
> server type machine and not loose the connection, based on googling, I
> could not find this outright on the Openssh.com site.
>
> It appears that the dropbear sshd also has the behavior.
>
> So I would not call this a bug.
>
> Sau!
>
Hi Saul,
I had a bit of a discussion with bluelightning and peteru in #oe. We came to
the conclusion that having ssh connections still up after service stop is
considered to be the correct behaviour.
On the other hand, not closing ssh connections on shutdown is generally
considered a bug by distros, although it is considered a minor one. This
generally requires connections being killed before network is brought down,
which might be complicated with sysvinit. These are the links from other
distros:
https://bugzilla.redhat.com/show_bug.cgi?id=626477
https://bugs.gentoo.org/show_bug.cgi?id=259183
https://bugs.archlinux.org/task/31250
Long story short: it would be nice to gracefully close ssh connections on
shutdown before terminating network connections, but it's a minor issue, and
probably not worth the effort of fixing.
Bests,
Diego
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-03 10:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 17:06 [BUG] Openssh not closing connections on service stop Diego
2014-12-03 0:13 ` Saul Wold
2014-12-03 10:21 ` Diego
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox