How to get SSH-daemon running again? SOLVED!


#1

Some weeks/months ago, I updated TrueOS stable. This caused sshd-service to “self-destruct”. After this, I changed something (what it was, I can’t remember, but it succeeded. Then it started again.). Then I changed to TrueOS unstable, because another service didn’t start any more after the next update. Under TrueOS unstable, SSH-daemon self-destructed, again. “Self-destruct” means: Neither starts at boot-time nor is startable manually.

Here’s what I get:
1.
# service sshd start
ERROR: sshd needs service(s) net-online

# rc-service sshd start
Caching service dependencies
Service sshd needs non existent service net-online
ERROR: sshd needs service(s) net-online

Where should I look? What’s to be done?

Should I try to reinstall sshd? Is this possible without breaking other stuff?

This is the reason, I don’t use TrueOS any more. I just started it now, to have a look, again.

Edit: This doesn’t help:
# pkg install --force FreeBSD-ssh-12.0.s20180323134922

Edit: Also, this doesn’t help:
# pkg install --force FreeBSD-runtime-12.0.s20180323134922


#2

What does your /etc/runlevels/init.d/sshd have in the depend()? The error message is telling me that the dependency list may be mucked up.
Force installing packages I would not think would fix it.
FWIW I’ve not had an issue with sshd starting on either stable or unstable.
What is the platform, desktop, laptop, wired ethernet, wireless?


#3

# ls /etc/runlevels/in*
ls: /etc/runlevels/in*: No such file or directory

Edit:
# cat /etc/rc.d/* | grep online
NOTHING found

# cat /etc/init.d/* | grep online
NOTHING found


#4

sorry, bad path.
/etc/init.d/sshd

I was looking at /etc/runlevels/default, sshd is a symlink back to /etc/init.d


#5

Please, look at my edits at bottom of previous posting.


#6

I may have found the culprit within my /etc/rc.conf:
rc_sshd_need=“net-online”
rc_sshd_after=“net-online”

This is strange, because for my personal changes, I usually use
/etc/rc.conf.local.

I’ll comment it out. We will see.
Probably, this will solve the problem…

Edit:
As expected, this solves it.


#7