"/etc/init.d/ssh stop" does not stop ssh server processes on 14.04

Bug #1390012 reported by Jonathan Carter
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running "/etc/init.d/ssh stop" does not result in ssh server being stopped. Running "service ssh stop" works fine.

As a result, running "/etc/init.d/ssh restart" does not restart sshd so new settings from sshd_config won't be loaded.

Using "service ssh restart" works fine, but ideally using the init script should still work as long as it's still there.

summary: - /etc/init.d/ssh stop does not stop ssh server processes
+ "/etc/init.d/ssh stop" does not stop ssh server processes
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: "/etc/init.d/ssh stop" does not stop ssh server processes

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1390012/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → openssh (Ubuntu)
Revision history for this message
Brian Murray (brian-murray) wrote :

What release did you notice this on? It worked fine for me on Vivid.

[ 8:26AM ] [ bdmurray@impulse:~ ]
 $ sudo /etc/init.d/ssh stop
ssh stop/waiting
[ 8:27AM ] [ bdmurray@impulse:~ ]
 $ ssh localhost
ssh: connect to host localhost port 22: Connection refused

Changed in openssh (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jan Groenewald (jan-aims) wrote : Re: [Aims] [Bug 1390012] Re: "/etc/init.d/ssh stop" does not stop ssh server processes

14.04 server installs.

On 6 November 2014 18:27, Brian Murray <email address hidden> wrote:

> What release did you notice this on? It worked fine for me on Vivid.
>
> [ 8:26AM ] [ bdmurray@impulse:~ ]
> $ sudo /etc/init.d/ssh stop
> ssh stop/waiting
> [ 8:27AM ] [ bdmurray@impulse:~ ]
> $ ssh localhost
> ssh: connect to host localhost port 22: Connection refused
>
>
> ** Changed in: openssh (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are a member of AIMS,
> which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1390012
>
> Title:
> "/etc/init.d/ssh stop" does not stop ssh server processes
>
> Status in “openssh” package in Ubuntu:
> Incomplete
>
> Bug description:
> Running "/etc/init.d/ssh stop" does not result in ssh server being
> stopped. Running "service ssh stop" works fine.
>
> As a result, running "/etc/init.d/ssh restart" does not restart sshd
> so new settings from sshd_config won't be loaded.
>
> Using "service ssh restart" works fine, but ideally using the init
> script should still work as long as it's still there.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1390012/+subscriptions
>
> --
> Mailing list: https://launchpad.net/~aims
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~aims
> More help : https://help.launchpad.net/ListHelp
>

--
  .~.
  /V\ Jan Groenewald
 /( )\ www.aims.ac.za
 ^^-^^

Revision history for this message
Jan Groenewald (jan-aims) wrote :

Server and desktop 14.04:

0 root@kontiki:~#ps auxw|grep sshd:
root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
[priv]
jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
jan@pts/9
root 32177 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
--color=auto sshd:
0 root@kontiki:~#/etc/init.d/ssh restart
1 root@kontiki:~#ps auxw|grep sshd:
root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
[priv]
jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
jan@pts/9
root 32186 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
--color=auto sshd:
0 root@kontiki:~#date
Thu Nov 6 18:37:17 SAST 2014
0 root@kontiki:~#/etc/init.d/ssh stop
0 root@kontiki:~#ps axuw|grep sshd
root 1513 0.0 0.0 61364 2796 ? Ss Nov02 0:00
/usr/sbin/sshd -D
root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
[priv]
jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
jan@pts/9
root 32198 0.0 0.0 8868 652 pts/9 R+ 18:37 0:00 grep
--color=auto sshd
0 root@kontiki:~#lsb_release -d
Description: Ubuntu 14.04.1 LTS
0 root@kontiki:~#

On 6 November 2014 18:36, Jan Groenewald <email address hidden> wrote:

> 14.04 server installs.
>
>
> On 6 November 2014 18:27, Brian Murray <email address hidden> wrote:
>
>> What release did you notice this on? It worked fine for me on Vivid.
>>
>> [ 8:26AM ] [ bdmurray@impulse:~ ]
>> $ sudo /etc/init.d/ssh stop
>> ssh stop/waiting
>> [ 8:27AM ] [ bdmurray@impulse:~ ]
>> $ ssh localhost
>> ssh: connect to host localhost port 22: Connection refused
>>
>>
>> ** Changed in: openssh (Ubuntu)
>> Status: Confirmed => Incomplete
>>
>> --
>> You received this bug notification because you are a member of AIMS,
>> which is subscribed to the bug report.
>> https://bugs.launchpad.net/bugs/1390012
>>
>> Title:
>> "/etc/init.d/ssh stop" does not stop ssh server processes
>>
>> Status in “openssh” package in Ubuntu:
>> Incomplete
>>
>> Bug description:
>> Running "/etc/init.d/ssh stop" does not result in ssh server being
>> stopped. Running "service ssh stop" works fine.
>>
>> As a result, running "/etc/init.d/ssh restart" does not restart sshd
>> so new settings from sshd_config won't be loaded.
>>
>> Using "service ssh restart" works fine, but ideally using the init
>> script should still work as long as it's still there.
>>
>> To manage notifications about this bug go to:
>>
>> https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1390012/+subscriptions
>>
>> --
>> Mailing list: https://launchpad.net/~aims
>> Post to : <email address hidden>
>> Unsubscribe : https://launchpad.net/~aims
>> More help : https://help.launchpad.net/ListHelp
>>
>
>
>
> --
> .~.
> /V\ Jan Groenewald
> /( )\ www.aims.ac.za
> ^^-^^
>

--
  .~.
  /V\ Jan Groenewald
 /( )\ www.aims.ac.za
 ^^-^^

Revision history for this message
Jan Groenewald (jan-aims) wrote : Re: "/etc/init.d/ssh stop" does not stop ssh server processes

Confirmed on third installation now, two servers and a desktop.

Changed in openssh (Ubuntu):
status: Incomplete → Confirmed
summary: - "/etc/init.d/ssh stop" does not stop ssh server processes
+ "/etc/init.d/ssh stop" does not stop ssh server processes on 14.04
Revision history for this message
Jan Groenewald (jan-aims) wrote : Re: [Aims] [Bug 1390012] Re: "/etc/init.d/ssh stop" does not stop ssh server processes
Download full text (4.1 KiB)

Bad example in previous post; here it is better:

0 root@kontiki:~#ps axuw|grep sbin/sshd
root 32302 0.0 0.0 61364 3052 ? Ss *18:51* 0:00
/usr/sbin/sshd -D
root 32310 0.0 0.0 8864 648 pts/9 S+ 18:53 0:00 grep
--color=auto sbin/sshd
0 root@kontiki:~#date
Thu Nov 6 *18:53*:34 SAST 2014
0 root@kontiki:~#/etc/init.d/ssh restart # doesn't work
1 root@kontiki:~#ps axuw|grep sbin/sshd
root 32302 0.0 0.0 61364 3052 ? Ss *18:51 * 0:00
/usr/sbin/sshd -D
root 32320 0.0 0.0 8864 652 pts/9 S+ 18:53 0:00 grep
--color=auto sbin/sshd
0 root@kontiki:~#date
Thu Nov 6 *18:53*:44 SAST 2014
0 root@kontiki:~#restart ssh # works
ssh start/running, process 32325
0 root@kontiki:~#date
Thu Nov 6 *18:53*:52 SAST 2014
0 root@kontiki:~#ps axuw|grep sbin/sshd
root 32325 0.0 0.0 61364 3048 ? Ss *18:53* 0:00
/usr/sbin/sshd -D
root 32329 0.0 0.0 8864 652 pts/9 S+ 18:53 0:00 grep
--color=auto sbin/sshd
0 root@kontiki:~#

On 6 November 2014 18:38, Jan Groenewald <email address hidden> wrote:

> Server and desktop 14.04:
>
> 0 root@kontiki:~#ps auxw|grep sshd:
> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
> [priv]
> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
> jan@pts/9
> root 32177 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
> --color=auto sshd:
> 0 root@kontiki:~#/etc/init.d/ssh restart
> 1 root@kontiki:~#ps auxw|grep sshd:
> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
> [priv]
> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
> jan@pts/9
> root 32186 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
> --color=auto sshd:
> 0 root@kontiki:~#date
> Thu Nov 6 18:37:17 SAST 2014
> 0 root@kontiki:~#/etc/init.d/ssh stop
> 0 root@kontiki:~#ps axuw|grep sshd
> root 1513 0.0 0.0 61364 2796 ? Ss Nov02 0:00
> /usr/sbin/sshd -D
> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd: jan
> [priv]
> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
> jan@pts/9
> root 32198 0.0 0.0 8868 652 pts/9 R+ 18:37 0:00 grep
> --color=auto sshd
> 0 root@kontiki:~#lsb_release -d
> Description: Ubuntu 14.04.1 LTS
> 0 root@kontiki:~#
>
>
>
> On 6 November 2014 18:36, Jan Groenewald <email address hidden> wrote:
>
>> 14.04 server installs.
>>
>>
>> On 6 November 2014 18:27, Brian Murray <email address hidden> wrote:
>>
>>> What release did you notice this on? It worked fine for me on Vivid.
>>>
>>> [ 8:26AM ] [ bdmurray@impulse:~ ]
>>> $ sudo /etc/init.d/ssh stop
>>> ssh stop/waiting
>>> [ 8:27AM ] [ bdmurray@impulse:~ ]
>>> $ ssh localhost
>>> ssh: connect to host localhost port 22: Connection refused
>>>
>>>
>>> ** Changed in: openssh (Ubuntu)
>>> Status: Confirmed => Incomplete
>>>
>>> --
>>> You received this bug notification because you are a member of AIMS,
>>> which is subscribed to the bug report.
>>> https://bugs.launchpad.net/bugs/1390012
>>>
>>> Title:
>>> "/etc/init.d/ssh stop" does not stop ssh server processes
>>>
>>> Status in “openssh” package in Ubuntu:
>>> Incomple...

Read more...

Revision history for this message
Jan Groenewald (jan-aims) wrote :
Download full text (4.9 KiB)

Even better:

0 root@snapperkob:~#cat /var/run/sshd.pid
1820
0 root@snapperkob:~#/etc/init.d/ssh restart
1 root@snapperkob:~#cat /var/run/sshd.pid
1820
0 root@snapperkob:~#/etc/init.d/ssh stop
0 root@snapperkob:~#cat /var/run/sshd.pid
1820
0 root@snapperkob:~#stop ssh
ssh stop/waiting
0 root@snapperkob:~#cat /var/run/sshd.pid
cat: /var/run/sshd.pid: No such file or directory
1 root@snapperkob:~#start ssh
ssh start/running, process 6842
0 root@snapperkob:~#cat /var/run/sshd.pid
6842
0 root@snapperkob:~#

On 6 November 2014 18:55, Jan Groenewald <email address hidden> wrote:

> Bad example in previous post; here it is better:
>
> 0 root@kontiki:~#ps axuw|grep sbin/sshd
> root 32302 0.0 0.0 61364 3052 ? Ss *18:51* 0:00
> /usr/sbin/sshd -D
> root 32310 0.0 0.0 8864 648 pts/9 S+ 18:53 0:00 grep
> --color=auto sbin/sshd
> 0 root@kontiki:~#date
> Thu Nov 6 *18:53*:34 SAST 2014
> 0 root@kontiki:~#/etc/init.d/ssh restart # doesn't work
> 1 root@kontiki:~#ps axuw|grep sbin/sshd
> root 32302 0.0 0.0 61364 3052 ? Ss *18:51 * 0:00
> /usr/sbin/sshd -D
> root 32320 0.0 0.0 8864 652 pts/9 S+ 18:53 0:00 grep
> --color=auto sbin/sshd
> 0 root@kontiki:~#date
> Thu Nov 6 *18:53*:44 SAST 2014
> 0 root@kontiki:~#restart ssh # works
> ssh start/running, process 32325
> 0 root@kontiki:~#date
> Thu Nov 6 *18:53*:52 SAST 2014
> 0 root@kontiki:~#ps axuw|grep sbin/sshd
> root 32325 0.0 0.0 61364 3048 ? Ss *18:53* 0:00
> /usr/sbin/sshd -D
> root 32329 0.0 0.0 8864 652 pts/9 S+ 18:53 0:00 grep
> --color=auto sbin/sshd
> 0 root@kontiki:~#
>
>
> On 6 November 2014 18:38, Jan Groenewald <email address hidden> wrote:
>
>> Server and desktop 14.04:
>>
>> 0 root@kontiki:~#ps auxw|grep sshd:
>> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd:
>> jan [priv]
>> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
>> jan@pts/9
>> root 32177 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
>> --color=auto sshd:
>> 0 root@kontiki:~#/etc/init.d/ssh restart
>> 1 root@kontiki:~#ps auxw|grep sshd:
>> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd:
>> jan [priv]
>> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
>> jan@pts/9
>> root 32186 0.0 0.0 8864 652 pts/9 S+ 18:37 0:00 grep
>> --color=auto sshd:
>> 0 root@kontiki:~#date
>> Thu Nov 6 18:37:17 SAST 2014
>> 0 root@kontiki:~#/etc/init.d/ssh stop
>> 0 root@kontiki:~#ps axuw|grep sshd
>> root 1513 0.0 0.0 61364 2796 ? Ss Nov02 0:00
>> /usr/sbin/sshd -D
>> root 7361 0.0 0.1 111844 4072 ? Ss Nov03 0:00 sshd:
>> jan [priv]
>> jan 7537 0.0 0.0 111844 2076 ? S Nov03 0:00 sshd:
>> jan@pts/9
>> root 32198 0.0 0.0 8868 652 pts/9 R+ 18:37 0:00 grep
>> --color=auto sshd
>> 0 root@kontiki:~#lsb_release -d
>> Description: Ubuntu 14.04.1 LTS
>> 0 root@kontiki:~#
>>
>>
>>
>> On 6 November 2014 18:36, Jan Groenewald <email address hidden> wrote:
>>
>>> 14.04 server installs.
>>>
>>>
>>> On 6 November 2014 18:27, Brian Murray <email address hidden> wrote:
>>>
>>>> What release...

Read more...

Revision history for this message
Torsten Curdt (tcurdt) wrote :

Seeing the very same thing here on a server install.

I consider severity quite high because I was trying to secure a new server installation with "PasswordAuthentication no".
 Only by accident I found that the sshd did not accept the new configuration and was still wide open with password authentication.

This is pretty bad.

Revision history for this message
Robie Basak (racb) wrote :

This sounds like a duplicate of bug 1273462 to me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.