Bug 704637 - sshd service is not started by systemd
Summary: sshd service is not started by systemd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: LiveCD
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-13 19:55 UTC by Jean-François Fortin Tam
Modified: 2013-01-10 06:36 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-12 04:33:36 UTC
Type: ---


Attachments (Terms of Use)

Description Jean-François Fortin Tam 2011-05-13 19:55:19 UTC
It seems that even though the openssh server is installed, it is not started on boot. I need to run "service sshd start" everytime.

Comment 1 Jan F. Chadima 2011-05-16 04:23:17 UTC
You maybe know that that systemd is not supported in f15, maybe not. If you really want to test the systemd units for sshd you may get it from rawhide's srpm and manually put them to the correct place. There is no will to add them to f15 rpms. But if you test it, pleasse report the bugs. It will be useful when the switch to sytemd will take place.

Comment 2 Jean-François Fortin Tam 2011-05-16 14:04:06 UTC
Ok, but be it by systemd or some other thing, I presume sshd should be started on boot, right?

Comment 3 Jan F. Chadima 2011-05-16 14:34:30 UTC
(In reply to comment #2)
> Ok, but be it by systemd or some other thing, I presume sshd should be started
> on boot, right?

yes but not by systemd, only upstart is supported in f15. The essential service should not support systemd in f15.

Comment 4 Tomas Mraz 2011-05-16 14:45:33 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Ok, but be it by systemd or some other thing, I presume sshd should be started
> > on boot, right?
> 
> yes but not by systemd, only upstart is supported in f15. The essential service
> should not support systemd in f15.

I think you meant SysV init script in the sentences above. Also s/should not/do not have to/.

Comment 5 Tomas Mraz 2011-05-16 14:46:29 UTC
What openssh package version do you have? Also have you installed F15 from scratch or by some upgrade method?

Comment 6 Jean-François Fortin Tam 2011-05-16 16:01:07 UTC
This is openssh-server 5.6p1-31. I installed Fedora from the F15 beta livecd, not by upgrading from a previous release.

Comment 7 Tomas Mraz 2011-05-16 16:23:10 UTC
That's really weird. The package has regular SysV init script that contains the default runlevels for starting. I thought that F15 still has support for it. Also I cannot reproduce it in F15 beta install (network install, no livecd). Maybe it is some problem in the livecd install?

If you call 'chkconfig --add sshd' and restart the computer, does the sshd start up automatically?

Comment 8 Jean-François Fortin Tam 2011-05-16 17:53:05 UTC
I ran "chkconfig --add sshd", restarted the computer, and it did not work. I could not ssh into the machine until I manually ran "service sshd start".

Comment 9 Tomas Mraz 2011-05-16 18:09:14 UTC
Can you try to update the systemd package and try the chkconfig --add sshd again? I think this must be some bug in the systemd support for SysV init scripts.

Comment 10 Jean-François Fortin Tam 2011-05-16 18:12:14 UTC
How do I "update" the systemd package, given that "yum update" says there are no updates available today?

Comment 11 Tomas Mraz 2011-05-16 18:33:21 UTC
Well I just wanted you to try to update if there are updates...

I don't really think this is openssh bug - it is either problem of systemd or the livecd installer.

You can also try chkconfig --del sshd ; chkconfig --add sshd - that might fix it.

Comment 12 Jean-François Fortin Tam 2011-06-09 18:23:49 UTC
For the record, "chkconfig --del sshd && chkconfig --add sshd" did "fix" my affected computer... but like avahi and cherokee and others, I'm left wondering how many systems are affected like this.

Comment 13 Stephen Haffly 2011-07-09 18:56:52 UTC
I tried the solution in comment #11, but it did not work.

systemctl status sshd.servicesshd.service - LSB: Start up the OpenSSH server daemon
Loaded: loaded (/etc/rc.d/init.d/sshd)
Active: failed since Sat, 09 Jul 2011 14:27:52 -0400; 7min ago
Process: 1531 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=255)
CGroup: name=systemd:/system/sshd.service

systemctl start sshd.service
Job failed. See system logs and 'systemctl status' for details.

When I execute ls /lib/systemd/system/*.service /etc/systemd/system/*.service, sshd is not in the list of services able to be started. 

My system is F15, x86_64 upgraded by wiping and reinstalling but kept /home partition by creating new encrypted /home and copying all folders/files over via rsync from the old unencrypted /home.

Sshd used to work on F14, but I am at a loss of how to get it to work now.

Linux XXXXXXX.XXXXXX 2.6.38.8-32.fc15.x86_64 #1 SMP Mon Jun 13 19:49:05 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
openssh-5.6p1-31.fc15.1.x86_64

All updates have been applied.

Comment 14 Stephen Haffly 2011-07-09 19:17:55 UTC
Update:  I found where sshd resides in /usr/sbin and tried to manually start it. That pointed me to a line in the sshd_config file that was causing the start to fail. After eliminating what it viewed as "garbage characters," it started up.

Comment 15 Jan F. Chadima 2011-07-10 19:37:27 UTC
(In reply to comment #14)
> Update:  I found where sshd resides in /usr/sbin and tried to manually start
> it. That pointed me to a line in the sshd_config file that was causing the
> start to fail. 

Can you tell me which line it is?


After eliminating what it viewed as "garbage characters," it
> started up.

Comment 16 Stephen Haffly 2011-07-11 00:17:52 UTC
It was the Banner line (line # 129). I had used spaces and punctuation in the line. Once I eliminated them, sshd started right up.

Comment 17 Jan F. Chadima 2011-07-11 16:56:52 UTC
(In reply to comment #16)
> It was the Banner line (line # 129). I had used spaces and punctuation in the
> line. Once I eliminated them, sshd started right up.


This was not the default installation? Is it?

Comment 18 Stephen Haffly 2011-07-11 17:06:29 UTC
It started as default. I modified the sshd_config file to change ports, disallow root login, and add a banner. It was in adding the banner that the problem occurred. I guess I don't really need a banner, but I wanted something to verify I had the correct machine.

Comment 19 Tomas Mraz 2011-07-11 17:27:06 UTC
The Banner is a filename of the file containing the banner.

Comment 20 Stephen Haffly 2011-07-11 18:01:36 UTC
Okay. I did not realize that. In my defense, it was not really clear in the default sshd_config file about that and the man page assumed that I already knew how to do this (took a bit too much for granted about my experience level with servers).

# no default banner path
#Banner none

I appreciate your pointer in the right direction. I going to fix this properly as soon as I finish this note. I am not setting up a public server but just setting it up so I can access my home machine and files while I am traveling.

Comment 21 Jan F. Chadima 2011-07-12 04:33:36 UTC
It seems to me that there is no bug.


Note You need to log in before you can comment on or make changes to this bug.