sshd not starting after enabling systemd

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

sshd not starting after enabling systemd

Postby darkphader » Sun May 26, 2013 18:21

Noticed that sshd was no longer starting after converting from openrc to systemd.

Using the openrc commands did not work:
Code: Select all
/etc/init.d/sshd[5294]: WARNING: sshd is already starting
/etc/init.d/sshd[5318]: ERROR: sshd stopped by something else
/etc/init.d/sshd[5322]: WARNING: sshd is already starting
/etc/init.d/sshd[5337]: ERROR: sshd stopped by something else

Finally discovered the systemctl command but it starts sshd with the -D and -e options which don't seem normal to me:
Code: Select all
/usr/sbin/sshd -D -e

Under openrc (at least on my Gentoo box) sshd is started with no options:
Code: Select all
/usr/sbin/sshd

Is it advisable to remove the -D and -e startup otions? Wouldn't it be normal to run sshd as a daemon instead of requesting that it doesn't? Connections seem a bit slower in this mode. And how does one do that?

Thanks.
darkphader
Baby Hen
 
Posts: 5
Joined: Mon May 06, 2013 18:52
Location: Motown

Re: sshd not starting after enabling systemd

Postby belcocco » Sun May 26, 2013 19:57

Please, output of the following commands (as root):
Code: Select all
# equo s net-misc/openssh
# eselect settingsd list
# eselect sysvinit list
# systemctl status sshd
Ciao
belcocco
Old Dear Hen
 
Posts: 459
Joined: Sat Nov 29, 2008 18:53
Location: Milan, Italy

Re: sshd not starting after enabling systemd

Postby kwacorn » Sun May 26, 2013 21:49

I was having a similar problem recently: viewtopic.php?f=52&t=29863

From which I learned I needed to use the command systemctl start sshd on my systemd system to start sshd, is that of any help in your case?
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: sshd not starting after enabling systemd

Postby darkphader » Mon May 27, 2013 0:10

belcocco wrote:Please, output of the following commands (as root):
Code: Select all
# equo s net-misc/openssh
# eselect settingsd list
# eselect sysvinit list
# systemctl status sshd
Ciao

Here it is:
Code: Select all
# equo s net-misc/openssh
>>  @@ Searching...
>>      @@ Package: net-misc/openssh-6.1_p1-r1 branch: 5, [sabayon-weekly]
>>         Available:     version: 6.1_p1-r1 ~ tag: NoTag ~ revision: 4
>>         Installed:     version: 6.1_p1-r1 ~ tag: NoTag ~ revision: 4
>>         Slot:          0
>>         Homepage:      http://www.openssh.org/
>>         Description:   Port of OpenBSD's free SSH release
>>         License:       BSD GPL-2
>>  Keywords:  net-misc/openssh
>>  Found:     1 entry

Code: Select all
# eselect settingsd list
Available settingsd implementations:
  [1]   openrc
  [2]   systemd *

Code: Select all
# eselect sysvinit list
Available sysvinit implementations:
  [1]   systemd *
  [2]   sysvinit

Code: Select all
# systemctl status sshd
sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
   Active: active (running) since Sun 2013-05-26 12:52:51 EDT; 6h ago
  Process: 4365 ExecStartPre=/usr/bin/ssh-keygen -A (code=exited, status=0/SUCCESS)
 Main PID: 4375 (sshd)
   CGroup: name=systemd:/system/sshd.service
           └─4375 /usr/sbin/sshd -D -e

May 26 12:52:51 fuzzy1.realcomputerguy.soho systemd[1]: Started OpenSSH server daemon.
May 26 12:52:51 fuzzy1.realcomputerguy.soho sshd[4375]: Server listening on 0.0.0.0 port 22.
darkphader
Baby Hen
 
Posts: 5
Joined: Mon May 06, 2013 18:52
Location: Motown

Re: sshd not starting after enabling systemd

Postby darkphader » Mon May 27, 2013 0:13

kwacorn wrote:I was having a similar problem recently: viewtopic.php?f=52&t=29863

From which I learned I needed to use the command systemctl start sshd on my systemd system to start sshd, is that of any help in your case?


Yes, I saw your thread earlier. My question now has more to do with running sshd with the -D and -e options which don't seem normal to me.
darkphader
Baby Hen
 
Posts: 5
Joined: Mon May 06, 2013 18:52
Location: Motown

Re: sshd not starting after enabling systemd

Postby lxnay » Mon May 27, 2013 8:53

Code: Select all
systemctl enable sshd
Image
Join us on IRC (chat.freenode.net #sabayon or WebChat)
Submit bugs to our Bug Tracker
Follow me on Twitter
Add me on Facebook
Add me on Google+
lxnay
Land Owner
 
Posts: 3596
Joined: Thu Oct 13, 2005 23:16
Location: Italy


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron