Discussion:
[e1] sshd startet nicht mehr
(zu alt für eine Antwort)
Wolfgang Loefstedt
2024-09-24 20:42:51 UTC
Permalink
Hallo allerseits,

seit kurzem startet der sshd auf meinem eis1 nicht mehr. Änderungen am
System wurden wissentlich nicht gemacht.

systemctl gibt folgendes aus (abgetippt, da kein SSH, bitte ev. Typos zu
entschuldigen):

eis# systemctl status sshd.service
x sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled;
preset: disabled)
Active: failed (Result: exit-code) since Tue 2024-09-24 14:48:40
CEST; 5min ago
Process: 1165 ExecStartPre=/usr/sbin/sshd -t $SSHD_OPTS
(code=exited, status =255/EXCEPTION)
CPU: 20ms
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Scheduled restart job,
restart counter is at 5.
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Start request repeated
too quickly.
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Failed with result
'exit code'.
Sep 24 14:48:40 eisfair systemd[1]: Failed to start OpenSSH Daemon.

Was kann ich machen?

Danke und Gruss,

Wolfgang
Holger Bruenjes
2024-09-24 20:59:37 UTC
Permalink
Hallo Wolfgang
Post by Wolfgang Loefstedt
seit kurzem startet der sshd auf meinem eis1 nicht mehr. Änderungen am
System wurden wissentlich nicht gemacht.
systemctl gibt folgendes aus (abgetippt, da kein SSH, bitte ev. Typos zu
Leider sind error Meldungen von systemd nicht sehr Zielfuehrend

lass mal die config rueberwachsen auch PM

Holger
Wolfgang Loefstedt
2024-09-26 11:53:10 UTC
Permalink
Post by Holger Bruenjes
lass mal die config rueberwachsen auch PM
Hallo Holger, hallo Marcus,

das Mainboard des Eis ist aufgrund hochgegangener Elkos gestorben, so
dass ich zur Zeit nicht an die config rankomme. Ich melde mich, wenn's
wieder läuft,

bis dann, Gruss, Wolfgang
Marcus Röckrath
2024-09-26 11:55:11 UTC
Permalink
Hallo Wolfgang,
Post by Wolfgang Loefstedt
das Mainboard des Eis ist aufgrund hochgegangener Elkos gestorben, so
dass ich zur Zeit nicht an die config rankomme. Ich melde mich, wenn's
wieder läuft,
Ok, mich würde es allerdings auch nicht wundern, wenn die sterbende Hardware
das Problem verursacht hat.
--
Gruß Marcus
[eisfair-Team]
W. Loefstedt
2024-10-01 17:52:51 UTC
Permalink
Post by Marcus Röckrath
Ok, mich würde es allerdings auch nicht wundern, wenn die sterbende Hardware
das Problem verursacht hat.
Hallo Marcus,
das Mainboard ist repariert, alles funktioniert wieder bis auf den sshd.
Die conf sieht folgendermassen aus:

#------------------------------------------------------------------------------
# /etc/config.d/ssh - configuration file for ssh
#
# Creation : 2012-09-15 hbfl
# Last Update: 2024-10-01 root
#
# Copyright (c) 2001-2024 the eisfair team, team(at)eisfair(dot)org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#------------------------------------------------------------------------------

# OpenSSH-VERSION 3.4.3

#------------------------------------------------------------------------------
# SSH - secure shell (general settings)
#------------------------------------------------------------------------------

START_SSH='yes'
# start ssh 'yes' or 'no'
SSH_PORT='22222'
# ssh port, see also FIREWALL_DENY_PORT_x

#------------------------------------------------------------------------------
# SSH - secure shell (protocol settings)
#------------------------------------------------------------------------------

SSH_SERVER_CIPHERS='all'
# allowed ciphers
SSH_SERVER_KEXS='all'
# allowed (Key Exchange) algorithms
SSH_SERVER_MACS='all'
# allowed MAC (message authentication
# code) algorithms

#------------------------------------------------------------------------------
# SSH - secure shell (listen address settings)
#------------------------------------------------------------------------------

SSH_LISTEN_ADDR_N='0'
# Number of addresses sshd should
listen to
# 0 - listen on all local addresses
SSH_LISTEN_ADDR_1_NAME=''
# Use a name, its only for you
SSH_LISTEN_ADDR_1_ACTIVE='yes'
# Use: yes or no
SSH_LISTEN_ADDR_1='1'
# First ip address, sshd should listen to
# use n'th ethernet card configured in
# /etc/config.d/base.
# E.g. SSH_LISTEN_ADDR_1='2' points to
# IP_ETH_2_IPADDR in /etc/config.d/base.


#------------------------------------------------------------------------------
# SSH - secure shell (allow/deny settings)
#
#
# Please use this settings with care.
# All four lists are checked when a login is
# done. So wrong settings could exclude an
# important user (e.g. root or eis) from login.
#------------------------------------------------------------------------------

SSH_ALLOW_USER_N='2'
# Number of user name patterns.
# Login is allowed only for user names
# that match one of the pattern. '*' and
# '?' can be used as wildcards in the
# patterns.
# Default: 0 - login is allowed for
all users.
SSH_ALLOW_USER_1_NAME=''
# Use a name, its only for you
SSH_ALLOW_USER_1_ACTIVE='yes'
# Use: yes or no
SSH_ALLOW_USER_1='root'
# First user name pattern.

SSH_ALLOW_USER_2_NAME=''
# Use a name, its only for you
SSH_ALLOW_USER_2_ACTIVE='yes'
# Use: yes or no
SSH_ALLOW_USER_2='oliaros'
# First user name pattern.

SSH_DENY_USER_N='0'
# Number of user name patterns.
# Login is disallowed only for user names
# that match one of the pattern. '*' and
# '?' can be used as wildcards in the
# patterns.
# Default: 0 - login is allowed for
all users.
SSH_DENY_USER_1_NAME=''
# Use a name, its only for you
SSH_DENY_USER_1_ACTIVE='no'
# Use: yes or no
SSH_DENY_USER_1='batch'
# First user name pattern.

SSH_ALLOW_GROUP_N='0'
# Number of group name patterns.
# Login is allowed only for users whose
# primary group or supplementary group
# matches one of the pattern. '*' and
'?' can
# be used as wildcards in the patterns.
# Default: 0 - login is allowed for
all groups.
SSH_ALLOW_GROUP_1_NAME=''
# Use a name, its only for you
SSH_ALLOW_GROUP_1_ACTIVE='no'
# Use: yes or no
SSH_ALLOW_GROUP_1='root'
# First group name pattern.

SSH_DENY_GROUP_N='0'
# Number of group name patterns.
# Login is disallowed only for users
whose
# primary group or supplementary group
# matches one of the pattern. '*' and
'?' can
# be used as wildcards in the patterns.
# Default: 0 - login is allowed for
all groups.
SSH_DENY_GROUP_1_NAME=''
# Use a name, its only for you
SSH_DENY_GROUP_1_ACTIVE='no'
# Use: yes or no
SSH_DENY_GROUP_1='batch'
# First group name pattern.

SSH_PERMITROOTLOGIN='without-password'
# Secifies whether root can login
using ssh.
# 'yes' User root can login.
# 'no' User root can't login.
# 'without-password' Password
authentication
# for user root is disabled. Note
that other
# authentications (e.g.
keyboard-interactive/
# PAM) may still allow root to login
using a
# password.
# 'forced-commands-only' root login with
# public key authentication will be
allowed,
# but only if the command option has been
# specified.

#------------------------------------------------------------------------------
# SSH - secure shell (public key settings for user root)
#------------------------------------------------------------------------------

SSH_PUBLIC_KEY_N='1'
# number of public keys or keyfile to add
# to /root/.ssh/authorized_keys
SSH_PUBLIC_KEY_1_NAME=''
# Use a name, its only for you
SSH_PUBLIC_KEY_1_ACTIVE='yes'
# Use: yes or no
SSH_PUBLIC_KEY_1='***************************************************'
# public key (identity.pub) generated
# by ssh-keygen
# If the first character is a slash (/)
# the value is interpreted as an absolut
# pathname of a file. The content of this
# file is added to the file
# /root/.ssh/authorized_keys


#------------------------------------------------------------------------------
# SSH - secure shell (additional settings)
#------------------------------------------------------------------------------

SSH_MAX_STARTUPS='5'
# maximum number of concurrent
unauthenticated
# connections. default: 10
SSH_COMPRESSION='yes'
# allow compression: 'yes' or 'no'
SSH_STRICTMODES='yes'
# Use Strictmodes: 'yes' or 'no'
SSH_PASSWDAUTH='yes'
# Allow password authentication 'yes'
# or 'no'. If password authentication
# is not allowed you have to use key
# authentication. Check that key
# authentication works fine before you
# set SSH_PASSWDAUTH to 'no'.
SSH_CH_RESPONSEAUTH='yes'
# Allow challenge response authentication
# 'yes' or 'no'.
SSH_CLIENTALIVEINTERVAL='0'
# Timeout interval in seconds for
# client alive message.
# Default: 0 - no message
SSH_CLIENTALIVECOUNTMAX='2'
# Number of client alive messages
# until disconnection.
# Default: 3

#------------------------------------------------------------------------------
# SSH - secure shell (subsystem settings)
#------------------------------------------------------------------------------

SSH_ENABLE_SFTP='yes'
# activate sftp: 'yes' or 'no'

#------------------------------------------------------------------------------
# SSH - secure shell (log level settings)
#------------------------------------------------------------------------------

SSH_LOGLEVEL='VERBOSE'
# Verbosity level that is used when
# logging messages from sshd.
# Values QUIET FATAL ERROR INFO VERBOSE
# DEBUG DEBUG1 DEBUG2 DEBUG3 are allowed.
# Default: INFO
# Logging with a DEBUG level violates
# the privacy of users and is not
# recommended.

#------------------------------------------------------------------------------
# End
#------------------------------------------------------------------------------


Hast du eine Idee?

Danke und Gruss,

Wolfgang
Marcus Röckrath
2024-10-01 18:11:02 UTC
Permalink
Hallo Wolfgang,
Post by W. Loefstedt
das Mainboard ist repariert, alles funktioniert wieder bis auf den sshd.
Die sieht normal aus.

Ändert sich was, wenn du nun im laufenden Betrieb

service stop sshd
service start sshd

machst?

Bitte ein Bild des Startvorgangs und des aktuellen Journals per PM:

systemd-analyze plot > start.svg
journalctl -b > journal.txt
--
Gruß Marcus
[eisfair-Team]
Wolfgang Loefstedt
2024-10-01 20:52:50 UTC
Permalink
Post by Marcus Röckrath
Ändert sich was, wenn du nun im laufenden Betrieb
service stop sshd
service start sshd
machst?
systemd-analyze plot > start.svg
journalctl -b > journal.txt
Hallo Marcus,

du hast Post,

Gruss, Wolfgang
Marcus Röckrath
2024-10-01 21:07:17 UTC
Permalink
Hallo Wolfgang,
Post by Wolfgang Loefstedt
Post by Marcus Röckrath
journalctl -b > journal.txt
du hast Post,
Danke und da steht auch der Grund:

Oct 01 22:32:42 eisfair sshd[13845]:
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf: line 1: Bad
configuration option: Host
Oct 01 22:32:42 eisfair sshd[13845]:
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf: terminating, 1 bad
configuration options
Oct 01 22:32:42 eisfair systemd[1]: sshd.service: Control process exited,
code=exited, status=255/EXCEPTION
Oct 01 22:32:42 eisfair systemd[1]: sshd.service: Failed with result 'exit-
code'.

Ich erinnere mich, dass wir mal darüber diskutiert haben, wie man spezielle
updatefeste Konfigurationen für einzelne Gegenstellen erstellen kann; ein
HowTo hatte ich danach auch darüber erstellt.

Gena über diese Sonderkonfiguration in
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf meckert er und verweigert
den Start.

Poste doch mal die Konfiguration für die telekom.

Versteckt sich da irgendwie ein Sonderzeichen, gegebenenfalls ein nur im
Hexeditor sichtbares?

Kannst mir diese conf-Datei auch mal zuschicken.
--
Gruß Marcus
[eisfair-Team]
Holger Bruenjes
2024-10-01 21:25:45 UTC
Permalink
Hallo
Post by Marcus Röckrath
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf: line 1: Bad
configuration option: Host
Ich erinnere mich, dass wir mal darüber diskutiert haben, wie man spezielle
updatefeste Konfigurationen für einzelne Gegenstellen erstellen kann; ein
HowTo hatte ich danach auch darüber erstellt.
Gena über diese Sonderkonfiguration in
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf meckert er und verweigert
den Start.
ehmm, ja, unabaengig von dem Fehler, eine user configuration sollte in

/etc/ssh/sshd_config.d

und _nicht_ in

/usr/etc/ssh/sshd_config.d

liegen

user configurationen liegen immer in /etc, _nie_ in /usr/?

Holger
Wolfgang Loefstedt
2024-10-02 06:02:45 UTC
Permalink
Post by Holger Bruenjes
Post by Marcus Röckrath
Gena über diese Sonderkonfiguration in
/usr/etc/ssh/sshd_config.d/hosting.telekom.de.conf meckert er und verweigert
den Start.
ehmm, ja, unabaengig von dem Fehler, eine user configuration sollte in
/etc/ssh/sshd_config.d
und _nicht_ in
/usr/etc/ssh/sshd_config.d
liegen
user configurationen liegen immer in /etc, _nie_ in /usr/?
Hallo Holger, hallo Martin,

Holger, das war's, der ssdd läuft wieder! Vielen Dank an euch beide für
die Hilfe,

Gruss, Wolfgang
Marcus Röckrath
2024-10-02 06:39:27 UTC
Permalink
Hallo Wolfgang,
Post by Wolfgang Loefstedt
Hallo Holger, hallo Martin,
Marcus :-))
Post by Wolfgang Loefstedt
Holger, das war's, der ssdd läuft wieder! Vielen Dank an euch beide für
die Hilfe,
Kein Typo oder Fehler sondern nur im falschen Pfad?
--
Gruß Marcus
[eisfair-Team]
Marcus Röckrath
2024-10-02 06:44:45 UTC
Permalink
Hallo Wolfgang,
Post by Wolfgang Loefstedt
Post by Holger Bruenjes
ehmm, ja, unabaengig von dem Fehler, eine user configuration sollte in
/etc/ssh/sshd_config.d
und _nicht_ in
/usr/etc/ssh/sshd_config.d
liegen
user configurationen liegen immer in /etc, _nie_ in /usr/?
Holger, das war's, der ssdd läuft wieder! Vielen Dank an euch beide für
die Hilfe,
No was:

Soll die "Sondernkonfiguration" für einen entfernten ssh-Server gelten, also
der eis ist Client, gehört diese Konfigurationsdatei IMHO nach
/etc/ssh/ssh_config.d.

In /etc/ssh/sshd_config.d kommen besondere Konfigurationen des lokalen ssh-
Servers.
--
Gruß Marcus
[eisfair-Team]
Marcus Röckrath
2024-10-02 06:56:00 UTC
Permalink
Hallo Wolfgang,
Post by Marcus Röckrath
Post by Wolfgang Loefstedt
Post by Holger Bruenjes
ehmm, ja, unabaengig von dem Fehler, eine user configuration sollte in
/etc/ssh/sshd_config.d
und _nicht_ in
/usr/etc/ssh/sshd_config.d
liegen
user configurationen liegen immer in /etc, _nie_ in /usr/?
Holger, das war's, der ssdd läuft wieder! Vielen Dank an euch beide für
die Hilfe,
Soll die "Sondernkonfiguration" für einen entfernten ssh-Server gelten,
also der eis ist Client, gehört diese Konfigurationsdatei IMHO nach
/etc/ssh/ssh_config.d.
In /etc/ssh/sshd_config.d kommen besondere Konfigurationen des lokalen
ssh- Servers.
Im damaligen Thread "[Eisfair] [E1] Datei-Upload mit curl auf
hosting.telekom.de schlägt fehl" wurde es auch so beschrieben:

https://lists.spline.de/pipermail/eisfair/2024-July/054133.html
--
Gruß Marcus
[eisfair-Team]
Marcus Röckrath
2024-10-02 06:38:29 UTC
Permalink
Hallo Holger,
Post by Holger Bruenjes
ehmm, ja, unabaengig von dem Fehler, eine user configuration sollte in
/etc/ssh/sshd_config.d
und _nicht_ in
/usr/etc/ssh/sshd_config.d
liegen
Das hatte ich sogar überlesen; im HowTo steht aber definitiv /etc/...
--
Gruß Marcus
[eisfair-Team]
Wolfgang Loefstedt
2024-10-02 08:52:21 UTC
Permalink
Post by Marcus Röckrath
Post by Marcus Röckrath
/etc/ssh/sshd_config.d
und _nicht_ in
/usr/etc/ssh/sshd_config.d
liegen
Das hatte ich sogar überlesen; im HowTo steht aber definitiv /etc/...
stimmt, war mein Fehler.

Gruss, Wolfgang

Marcus Röckrath
2024-09-25 06:14:40 UTC
Permalink
Hallo Wolfgang,
Post by Wolfgang Loefstedt
seit kurzem startet der sshd auf meinem eis1 nicht mehr. Änderungen am
System wurden wissentlich nicht gemacht.
systemctl gibt folgendes aus (abgetippt, da kein SSH, bitte ev. Typos zu
eis# systemctl status sshd.service
x sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled;
preset: disabled)
Active: failed (Result: exit-code) since Tue 2024-09-24 14:48:40
CEST; 5min ago
Process: 1165 ExecStartPre=/usr/sbin/sshd -t $SSHD_OPTS
(code=exited, status =255/EXCEPTION)
CPU: 20ms
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Scheduled restart job,
restart counter is at 5.
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Start request repeated
too quickly.
Sep 24 14:48:40 eisfair systemd[1]: sshd.service: Failed with result
'exit code'.
Sep 24 14:48:40 eisfair systemd[1]: Failed to start OpenSSH Daemon.
System aktuell?

Bitte poste die ssh-Konfiguration.
--
Gruß Marcus
[eisfair-Team]
Loading...