[Eisfair] kein ssh-Zugriff nach update UND reboot

Stefan Puschek stefan.puschek at t-online.de
Do Mai 25 14:18:28 CEST 2023


Hallo Holger,

> >>> Wo kann ich suchen / was für Infos braucht Ihr?
> >>
> >> bis du mal durch die config gegangen
> > 
> > jetzt schon - aufrufen und neu speichern - hat aber nix gebracht.
> > 
> > wonach soll ich in der config suchen?
> 
> ehmm, wenn ich das wuesste ;-)
> 
> 
> zur Kontrolle
> 
> die sshd config -> /usr/etc/ssh/sshd_config

barbrady # cat /usr/etc/ssh/sshd_config
#----------------------------------------------------------------------------
# sshd_config file generated by ssh
#
# Do not edit this file, edit /etc/config.d/ssh
# Creation date: 2023-05-25 
#----------------------------------------------------------------------------
#       $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
#
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
#
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
#
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.
#
# To modify the system-wide sshd configuration, create a "*.conf" file
under # "/etc/ssh/sshd_config.d/" which will be automatically included
below. # Don't edit this configuration file itself if possible to avoid
update # problems.
Include /etc/ssh/sshd_config.d/*.conf

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.
Include /usr/etc/ssh/sshd_config.d/*.conf

# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO

Port 22
#AddressFamily any

ListenAddress 192.168.6.7
ListenAddress 127.0.0.1

# The default requires explicit activation of protocol 1
Protocol 2

#AllowGroups
AllowUsers root 
#DenyGroups
#DenyUsers

# 2015-01-08/JED - applied changes recommended on the following website
to harden ssh: #
https://stribika.github.io/2015/01/04/secure-secure-shell.html #
          - deactivating protocol version 1 #                  -
deactivating protocol version 2 keys: dsa, ecdsa #                  -
adding protocol version 2 key: ed25519 #                  - adding new
parameters: Ciphers, KexAlgorithms, MACs

# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Ciphers, KexAlgorithms, MACs
Ciphers
chacha20-poly1305 at openssh.com,aes256-gcm at openssh.com,aes128-gcm at openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
KexAlgorithms
curve25519-sha256 at libssh.org,diffie-hellman-group-exchange-sha256 MACs
hmac-sha2-512-etm at openssh.com,hmac-sha2-256-etm at openssh.com,umac-128-etm at openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128 at openssh.com

# Authentication:

LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

# deprecated RSAAuthentication yes
PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and
.ssh/authorized_keys2 # but this is overridden so installations will
only check .ssh/authorized_keys #AuthorizedKeysFile
.ssh/authorized_keys

# For this to work you will also need host keys in
/etc/ssh/ssh_known_hosts # deprecated RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding no
X11DisplayOffset 10
#X11UseLocalhost yes
PrintMotd yes
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
# deprecated UsePrivilegeSeparation 
#PermitUserEnvironment no
Compression no
ClientAliveInterval 0
ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
MaxStartups 10
#PermitTunnel no
#ChrootDirectory none


# no default banner path
#Banner none

# override default of no subsystems'
Subsystem sftp /usr/libexec/ssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	ForceCommand cvs server
barbrady # 

Aber sollte diese config nicht ok sein, denn wenn ich den sshd HÄNDISCH
restarte dann klappt es ja...

Andere Frage: wird eventuell der sshd ZU FRÜH gestartet -z.B. bevor das
Netzwerk da ist; das hatten wir doch letztens schon...

wie bekomme ich die REIHENFOLGE der gestarteten Services?

Groetjes
Stefan




Mehr Informationen über die Mailingliste Eisfair