Newly installed openssh-server and upstart: status: Unknown job: ssh

Asked by Ivan Voras on 2014-09-09

Just after installing openssh-server, there is no ssh service in the initctl's list. Consequently, the SSH server cannot be started:

# initctl start ssh
initctl: Unknown job: ssh

# dpkg -l | grep ssh
ii openssh-client 1:6.6p1-2ubuntu2 i386 secure shell (SSH) client, for secure access to remote machines
ii openssh-server 1:6.6p1-2ubuntu2 i386 secure shell (SSH) server, for secure access from remote machines

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

# initctl reload-configuration
# initctl list | grep ssh
ssh-agent start/running

# ps axuw | grep ssh
ivoras 1578 0.0 0.0 4216 200 ? Ss Sep08 0:00 ssh-agent -s
root 11810 0.0 0.0 6168 852 pts/2 S+ 11:26 0:00 grep ssh

# initctl start ssh
initctl: Unknown job: ssh

Running "/etc/init.d/ssh" does not do anything since the script exits, AFAIK in the upstart check.
Running "service ssh restart" results in:

# service ssh restart
stop: Unknown job: ssh
start: Unknown job: ssh

So the question is - how do I control the ssh service in Ubuntu 14.04?

*Update*: After rebooting the machine, sshd is started (!), but still not visible in "initctl list" (!!) and running /etc/init.d/ssh still doesn't do anything (!!!), as well as the "service" command returning the same "Unknown job: ssh" error.

I'm... a bit puzzled on how these things should work in Ubuntu?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Last query:
2014-09-09
Last reply:
2014-09-09

Does:

sudo /etc/init.d/ssh restart

Work? If file is not found, try:

sudo /etc/init.d/sshd start

You could report a bug with:

ubuntu-bug openssh-server

Usually installed services start post install.

Ivan Voras (ivoras) said : #3

As an update, the ssh.conf file exists in /etc/init :

# ls /etc/init/*ssh*
/etc/init/ssh.conf

What is the output of:

sudo updatedb; locate ssh

Thanks

Ivan Voras (ivoras) said : #5

This is of course a very large list, I've pasted it at http://pastebin.com/jL8GmQhs .

Its not that long and there is no length limit here. People post really ling dmesg outputs without issue.

Seems the script is;

/etc/init.d/ssh

Which you can use to start and stop the service etc.

Ivan Voras (ivoras) said : #7

No, it is not. Please read the entirety of my initial bug report. Specifically, this line:

"Running "/etc/init.d/ssh" does not do anything since the script exits, AFAIK in the upstart check."

Ivan Voras (ivoras) said : #8

This is why /etc/init.d/ssh doesn't work:

# sh -x /etc/init.d/ssh start
+ set -e
+ test -x /usr/sbin/sshd
+ umask 022
+ test -f /etc/default/ssh
+ . /etc/default/ssh
+ SSHD_OPTS=
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/50-ubuntu-logging ]
+ . /lib/lsb/init-functions.d/50-ubuntu-logging
+ LOG_DAEMON_MSG=
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ [ -n ]
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/sbin:/sbin
+ check_for_upstart 1
+ init_is_upstart
+ [ -x /sbin/initctl ]
+ + /bin/grep -q upstart/sbin/initctl
 version
+ return 0
+ exit 1

Add it to your bug

Can you help with this problem?

Provide an answer of your own, or ask Ivan Voras for more information if necessary.

To post a message you must log in.