ups...
sorry.. habe das alte config file mit dem neu erstellen von harden_suse
verglichen.. und es
ist mir nicht aufgefallen...
hab nun logischerweise PermitRootLogin = yes
und mal PAMAuthenticationViaKbdInt = yes
probiert.. hat aber nichts gebracht.
kann es sein das in /etc/pam.d/sshd etwas nicht stimmt?
hier nochmals das nun korrekte sshd_config files:
Port 22
Protocol 1,2
ListenAddress 192.168.2.2
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
#HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 300
KeyRegenerationInterval 3600
PermitRootLogin yes
#
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for
RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding no
X11DisplayOffset 10
PrintMotd yes
#PrintLastLog no
KeepAlive yes
# Logging
SyslogFacility AUTH
LogLevel INFO
#obsoletes QuietMode and FascistLogging
RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
#
RSAAuthentication yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
ChallengeResponseAuthentication no
# Uncomment to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes
#CheckMail yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
#ReverseMappingCheck yes
Subsystem sftp /usr/lib/ssh/sftp-server
-----Ursprüngliche Nachricht-----
Von: Muammer Arslan [mailto:Muammer.Arslan@experteach.de]
Gesendet: Donnerstag, 12. September 2002 11:46
An: Wolfgang Rest
Betreff: Antwort: AW: Antwort: [suse-security] sshd, harden_suse, pam und
md5
Nach meinem Wissenstand sollte der root-Login mit diesen Einträgen in
/etc/sshd/sshd_config nicht funktionieren. Wenn mann root-Login erlauben
will, muss der Eintrag auf yes gesetzt werden. Deine Einstellung sieht wie
folgt aus:
PermitRootLogin no
#PAMAuthenticationViaKbdInt yes
gruß
Muammer
"Wolfgang Rest"
12.09.2002 11:22
An: "Muammer Arslan" ,
Kopie:
Thema: AW: Antwort: [suse-security] sshd,
harden_suse, pam und md5
sorry.. hab ich leider vergessen zu sagen/schreiben...
in der /etc/hosts.allow ist SSHD : ALL eingetragen.
habe an der ssh config oder in der hosts.allow nichts verändert,
nur seit ich auf md5 umgestellt habe funktioniert es nicht mehr.
wieso sollte sich root nicht einloggen können? hatte immer mit dieser
config funktioniert.
(das config file verwende ich auch noch auf anderen servern (wo kein md5
aktiviert) und alles
funnzt.
mfg
Wolfgang
-----Ursprüngliche Nachricht-----
Von: Muammer Arslan [mailto:Muammer.Arslan@experteach.de]
Gesendet: Donnerstag, 12. September 2002 10:59
An: webmaster@hackenschmiede.com
Betreff: Antwort: [suse-security] sshd, harden_suse, pam und md5
wenn du harden_suse laufen gelassen hast, musst du, wenn du mit ssh
zugreifen willst, dein Host, IP-Nummer oder Netzwerk in /etc/hosts.allow
aufnehmen wie z.B. für das ganze C-Netz 192.168.1.0
sshd: 192.168.1.0/255.255.255.0
Danach müsste Login wieder klappen wobei der root-Login laut deiner
Konfiguration nicht einloggen kann.
Gruß
Muammer
12.09.2002 10:21
An:
Kopie:
Thema: [suse-security] sshd, harden_suse, pam und md5
hallo vielleicht könnt ihr mir mal kurz helfen,
folgendes Problem, habe auf ner 7.3er mal den harden_suse laufen lassen.
dabei habe ich auch unter anderem die password auth. auf md5 umgestellt.
danach konnte ich mich nicht mehr mit ssh anmelden, daher habe ich aus der
/etc/pam.d/sshd die md5 einträge gelöscht damit funktionierte wieder
alles.
;) ok.. nun hab ichs gecheckt.. das root password war natürlich noch nicht
MD5 ;(
hab dann das password geändert.. und somit steht nun in der /etc/shadow
das
password
im md5 format (beginnt mit $1$ usw..)
nun habe ich in der /etc/pam.d/sshd die md5 einträge wieder eingetragen,
sshd neu gestartet.. aber.. kann mich nicht mehr anmelden (access denied!)
schon mal danke für eure tips.
mfg
Wolfgang
hier mal meine config files:
/etc/pam.d/sshd
#%PAM-1.0
auth required /lib/security/pam_unix.so #
set_secrpc
auth required /lib/security/pam_nologin.so
auth required /lib/security/pam_env.so
account required /lib/security/pam_unix.so
password required /lib/security/pam_pwcheck.so md5
use_cracklib
password required /lib/security/pam_unix.so md5 use_first_pass
use_authtok
session required /lib/security/pam_unix.so none #
trace or debug
session required /lib/security/pam_limits.so
/etc/ssh/ssh_config
Host *
# ForwardAgent no
# ForwardX11 no
# RhostsAuthentication no
# RhostsRSAAuthentication yes
# RSAAuthentication yes
# PasswordAuthentication yes
# FallBackToRsh no
# UseRsh no
# BatchMode no
# CheckHostIP yes
# StrictHostKeyChecking yes
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_rsa
# Port 22
Protocol 1,2
# Cipher blowfish
# EscapeChar ~
ForwardAgent no
ForwardX11 no
FallBackToRsh no
/etc/ssh/sshd_config
Port 22
Protocol 1,2
ListenAddress 192.168.2.2
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
#HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 300
KeyRegenerationInterval 3600
PermitRootLogin no
#
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for
RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding no
X11DisplayOffset 10
PrintMotd yes
#PrintLastLog no
KeepAlive yes
# Logging
SyslogFacility AUTH
LogLevel INFO
#obsoletes QuietMode and FascistLogging
RhostsAuthentication no
#
# For this to work you will also need host keys in
/etc/ssh/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
#
RSAAuthentication yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
ChallengeResponseAuthentication no
# Uncomment to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of
'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes
#CheckMail yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
#ReverseMappingCheck yes
Subsystem sftp /usr/lib/ssh/sftp-server
--
Check the headers for your unsubscription address
For additional commands, e-mail: suse-security-help@suse.com
Security-related bug reports go to security@suse.de, not here