sshd aktzeptier nur die /root/.ssh/authorized_keys
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
mal mit ssh -v verbinden und den Debug log durch schauen. Mir kommt es eher so vor, als dürfte sich dein User nicht einloggen (keine gültige Shell oÄ)
-
lord_pinhead
- Posts: 774
- Joined: 2004-04-26 15:57
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Auch den Eigentümer auf test300 geändert und die Gruppe?matzewe01 wrote: Nun gibt es einen 2. Benutzer: test300 der sein Homeverzeichnis hier hat.
/home/test300
Auch dort habe ich den Order .ssh angelegt und den key in der authorized_key abgelegt.
Wie meinst du mit dem gleichen schlüssel? Hast du einen neuen erstellt oder den gleichen wie Root verwendet?matzewe01 wrote: Soweit so gut.
In der shhd_config steht folgendes.
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile ~/.ssh/authorized_keys
Reload des sshd Dämons, und ich kann mich wie erwartet als root einloggen.
Mit dem gleichen Schlüssel kann ich mich wiederum nicht als test300 einloggen.
Das war ja klar ;)matzewe01 wrote: Um der Sache auf die Spur zu kommen, habe ich den Schlüssel aus: /home/test300/.ssh nach /.ssh/ verschoben und die sshd_config entsprechend angepasst.
AuthorizedKeysFile /.ssh/authorized_keys
Jetzt kann ich mich jedoch mit allen Benutzern einloggen.
Der SSH Daemon bzw. PAM sieht nach in welchen Direktory dein User sein home hat (~), also ~/.ssh/ ist für test300 die abkürzung /home/test300/.ssh/ . Wenn du jetzt die Schlüssel Systemweit in / kopierst, kann jeder User daruf zugreifen und der Sinn des Pubkeys ist eigentlich dahin. Welche Rechte hast du auf die Datei gesetzt und wie ist der Inhalt?matzewe01 wrote: Mir scheint also, nachdem ich unter
/etc/init.d/sshd
den Dienst als root starte, er nur das Heimverzeichnis des Root Users zur Laufzeit kennt.
Wie stelle ich das ab? Unter jedem Benutzer einen eigenen ssh Dämon laufen lassen?
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Die authorized_keys Datei muss im .ssh Verzeichnis liegen. Nicht auf dem gleichen Level wie dieses.
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Achja und gewöhn dir bitte mal an, solche Ausgaben in code Blöcken zu posten. Das erhöht die Lesbarkeit ungemein.
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Lesen, verstehen, umsetzen:
http://www.rootforum.org/wiki/howto/gen ... figurieren
http://www.rootforum.org/wiki/howto/gen ... er_anlegen
http://www.rootforum.org/wiki/howto/gen ... figurieren
http://www.rootforum.org/wiki/howto/gen ... er_anlegen
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings 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.
Wings for Life ● Wings 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.
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Du hast die sshd_config nicht gemäss HowTo angepasst...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings 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.
Wings for Life ● Wings 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.
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
duergner wrote:Achja und gewöhn dir bitte mal an, solche Ausgaben in code Blöcken zu posten. Das erhöht die Lesbarkeit ungemein.
Code: Select all
[code]
blah
und nicht
Code: Select all
<code>
blah
</code>
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Wenn Dein OpenSSH die Option "AddressFamily" nicht kennt, dann nimm diese Zeile einfach raus.
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings 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.
Wings for Life ● Wings 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.
Re: sshd aktzeptier nur die /root/.ssh/authorized_keys
Ich verweise im HowTo nicht grundlos auf "man sshd_config"...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings 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.
Wings for Life ● Wings 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.
