PermitRootLogin funktioniert nicht...

Rund um die Sicherheit des Systems und die Applikationen
Post Reply
beeker
Posts: 11
Joined: 2005-02-07 14:12

PermitRootLogin funktioniert nicht...

Post by beeker »

Huhu,

möglicher Weise sehe ich den Wald vor lauter Bäumen nicht mehr 8O , aber irgendwie ignoriert mein sshd den Eintrag PermitRootLogin no aus der sshd_config vollkommen. Völlig egal was ich da rein tippse der root kommt trotzdem rein.
Habe den sshd natürlich auch schön brav restartet nach jeder Ã?nderung.

Was habe ich übersehen??
User avatar
Joe User
Project Manager
Project Manager
Posts: 11193
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:

Re: PermitRootLogin funktioniert nicht...

Post by Joe User »

Code: Select all

UsePAM No
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
beeker
Posts: 11
Joined: 2005-02-07 14:12

Re: PermitRootLogin funktioniert nicht...

Post by beeker »

Joe User wrote:

Code: Select all

UsePAM No
Stand bei mir auf UsePAM yes. Die Umstellung auf no hat aber auch nicht geholfen. Alles beim Alten. Der root darf rein.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11193
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:

Re: PermitRootLogin funktioniert nicht...

Post by Joe User »

Code: Select all

cat /etc/ssh/sshd_config
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
beeker
Posts: 11
Joined: 2005-02-07 14:12

Re: PermitRootLogin funktioniert nicht...

Post by beeker »

So, ich hab hier mal die sshd_config...
Nach der ganzen Rumprobiererei sieht die schon etwas wild aus.

Code: Select all

Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
#PermitRootLogin without-password
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 no
PrintLastLog no
KeepAlive yes

# Privilege seperation geht nicht unter 2.2 mit eingeschalteter Kompression,
# da dort mmap anders implementiert ist:
Compression no

# Logging
SyslogFacility AUTH
LogLevel DEBUG
#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/sftp-server
UsePAM no
timeless2
Posts: 415
Joined: 2005-03-04 14:45
Location: Paris

Re: PermitRootLogin funktioniert nicht...

Post by timeless2 »

ssh neu gestartet?
beeker
Posts: 11
Joined: 2005-02-07 14:12

Re: PermitRootLogin funktioniert nicht...

Post by beeker »

timeless2 wrote:ssh neu gestartet?
Jep... dachte ich jedenfalls...oh, wie peinlich :roll: ! Hab mir nämlich für alle wichtigen Sachen (u.a. auch dem sshd) kleine Scripts zum Starten/Beenden/Neu-Starten gemacht und beim sshd (möglicherweise völlig im Wahn) aus versehen

Code: Select all

sshd restart
anstelle von

Code: Select all

ssh restart
reingetippst. Dann kann das auch nicht klappen. Wie man an so'nem kleinen Scheisserchen verzweifeln kann. Unglaublich.

Aber vielen Dank für die Anteilnahme. Werde mich bessern!
timeless2
Posts: 415
Joined: 2005-03-04 14:45
Location: Paris

Re: PermitRootLogin funktioniert nicht...

Post by timeless2 »

Manchmal macht man sich die Arbeit zusätzlich schwer, dafür ist die Lösung umso einfacher :wink:
Post Reply