sshd startet nicht beim Systemstart

saputra

Member
Hallo Leute!
Ich hab ein etwas seltsames Problem... sshd wird einfach nicht beim hochfahren gestartet. Ein manuelles starten von sshd als root funktioniert jedoch und der dienst läuft danach problemlos.
Bei der Installation habe ich das automatische starten von sshd zunächst deaktiviert und dann später mit sysinstall aktiviert, was ja soweit ich weiß nur zu der Änderung in der rc.conf 'sshd_enable="YES"' führt. Trotzdem wird sshd nicht gestartet:

Code:
ssh: connect to host localhost.freebsd port 22: Connection refused

Nun hab ich mir nochmal genau angeschaut, was mir beim booten so angezeigt wird, und es scheint ein paar Probleme zu geben, und ich weiß nicht wodurch und seit wann sie auftreten:

Code:
Starting syslogd.
Initial i386 initialization:.
Additional ABI support: linux.
Starting usbd.
Starting local daemons:.
Updating motd.
Mounting late file systems:.
Configuring syscons: keymap blanktime.
/dev/emu10kx0: line 1: Bad configuration option: FreeBSD
/dev/emu10kx0: line 3: Bad configuration option: Hardware
/dev/emu10kx0: line 4: Bad configuration option: DSP
/dev/emu10kx0: line 5: Bad configuration option: DSP
/dev/emu10kx0: line 6: Bad configuration option: Card
/dev/emu10kx0: line 8: Bad configuration option: Installed
/dev/emu10kx0: line 9: Bad configuration option: EMU10Kx
/dev/emu10kx0: line 10: Bad configuration option: FX
/dev/emu10kx0: line 11: Bad configuration option: Playback
/dev/emu10kx0: line 12: Bad configuration option: Recording
/dev/emu10kx0: line 13: Bad configuration option: EMU10Kx
/dev/emu10kx0: line 14: Bad configuration option: Analog
/dev/emu10kx0: terminating, 12 bad configuration options
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

debugflags: ext sch proc pars load misc test bit
Local package initialization:.
Additional TCP options:.
Starting default moused:.
Starting background file system checks in 60 seconds.

Tue Aug 21 16:01:11 CEST 2007

FreeBSD/i386 (saputra.freebsd) (ttyv0)

Was auch etwas seltsam ist: Der Fehler mit /dev/emu10kx0 wird nur dann angezeigt, wenn in der rc.conf "sshd_enable="YES" eingetragen ist, sonst nicht! Erkenne da nicht den zusammenhang (Soundkarte funktioniert weiterhin aber trotzdem problemlos).
Die fortlaufende Nachricht
Code:
debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

tritt aber auf, egal ob sshd in der rc.conf nun aktiviert oder deaktiviert ist.

Kann mir irgendjemand von euch weiterhelfen? Bin im Moment echt ziemlich ratlos. Ach ja, benutze FreeBSD 6.2.
 
Code:
# -- sysinstall generated deltas -- # Tue Aug 14 19:31:34 2007
# Created: Tue Aug 14 19:31:34 2007
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.0.1"
hostname="saputra.freebsd"
ifconfig_sis0="inet 192.168.0.2  netmask 255.255.255.0"
keymap="german.iso"
linux_enable="YES"
moused_enable="YES"
usbd_enable="YES"
# -- sysinstall generated deltas -- # Tue Aug 14 22:20:59 2007
ifconfig_sis0="inet 192.168.0.2  netmask 255.255.255.0"
defaultrouter="192.168.0.1"
tcp_extensions="YES"
hostname="saputra.freebsd"
# -- sysinstall generated deltas -- # Tue Aug 21 15:57:05 2007
sshd_enable="YES"
 
Code:
debugflags: ext sch proc pars load misc test bit
cron: illegal option -- f
usage: cron [-j jitter] [-J rootjitter] [-s] [-o] [-x debugflag[,...]]

Wie sieht den deine /etc/crontab aus?

Sieht für mich so aus, als wenn cron irgendwo mit dem Argument -f aufgerufen wird.

mousaka

BTW: Willkommen im Forum:)
 
Was sagt denn

# /etc/rc.d/sshd status

Hast du in letzter Zeit aus den Quellen geupdatet ohne mergemaster laufen zu lassen? Das sieht ja insgesamt ziemlich vermurkst bei dir aus.
 
@mousaka:
meine /etc/crontab sieht so aus:
Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute	hour	mday	month	wday	who	command
#
*/5	*	*	*	*	root	/usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11	*	*	*	*	operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0	*	*	*	*	root	newsyslog
#
# Perform daily/weekly/monthly maintenance.
1	3	*	*	*	root	periodic daily
15	4	*	*	6	root	periodic weekly
30	5	1	*	*	root	periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31	0-5	*	*	*	root	adjkerntz -a

ach ja und danke fürs willkommen :)

@kamikaze:
Das ganze liefert: sshd is not running.
 
ach sorry, ganz überlesen... ich wusste bis eben nichtmal dass es sowas wie mergemaster gibt. bin noch ziemlich neu bei freebsd. hab bisher aber fast nur mit "pkg_add -r" pakete installiert, kaum direkt aus den ports kompiliert... Könnt ich da was falsch gemacht haben und was könnt ich dagegen tun?
geupdated hab ich gar nicht...
 
Wenn du kein Systemupdate durchgeführt hast, wird auch mergemaster nicht benötigt. Das ganze hat aber auch nichts mit Paketen zu tun. Irgendwo ist im Basissystem der Wurm.

# /etc/rc.d/sshd start

Was passiert dann?
 
Die Ausgabe ist:

Code:
Starting sshd.
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

Hmm seltsam... Ich dachte irgendwie ich hätte das schon ausprobiert und es hatte funktioniert. Wobei, ich glaub das war direkt /usr/sbin/sshd. Da geht das dann ohne Probleme... Muss ich mir einen Hostkey anlegen?
 
Ahh. Hab ausversehen vergessen dass ich nicht root war. Also wenn ich das ganze als root mache ist es kein Problem:

Code:
saputra# /etc/rc.d/sshd start
Starting sshd.

und danach fun ktioniert auch der login über ssh... Irgendwie komisch. Nur der start beim hochfahren geht eben nicht.
 
Zuletzt bearbeitet:
Dann muss es irgendwie mit den anderen Problemen beim Start zusammenhängen. Ich habe jedenfalls keine vernünftige Erklärung dafür.
 
Hallo,
schau Dir mal Deine /etc/rc.conf an. Dort sollten Dinge wie Hostname oder Netzwerkkonfigurationen für Interfaces nicht doppelt drin sein. Bereinige das mal und versuch es danach nochmal. Ggf. verursacht dies Deine Probleme.

eine bereinigte /etc/rc.conf von Dir könnte ungefähr so aussehen:
hostname="saputra.freebsd"
defaultrouter="192.168.0.1"
ifconfig_sis0="inet 192.168.0.2 netmask 255.255.255.0"
keymap="german.iso"
linux_enable="YES"
moused_enable="YES"
usbd_enable="YES"
tcp_extensions="YES"
sshd_enable="YES"

Gruß Bummibaer
 
Wenn was mehrfach auftaucht gilt der letzte Eintrag. Die rc.conf ist einfach ein sh Skript.
 
Hoi,

theoretisch ja, praktisch gabs damit aber schon mal kleine Probleme ... von daher dacht ich es wär mal ein Versuch wert. Im schlimmsten Fall hilft es nicht aber schaden kann der Versuch ned. Falls es hilft auch gut.

Gruß Bummibaer
 
Bitte mal prüfen, ob die letzte Zeile (hier sshd_...) auch abgeschlossen ist, sprich hat sie ein CR.
IMHO wird die letzte Zeile sonst nicht richtig erkannt.

Stefan
 
Zurück
Oben