SSH Passwort-Login verbieten?
Hallo Liste! Gibt es eine Möglichkeit in OpenSSH den Login mit Passwort gänzlich zu verbieten und nur Schlüssel zu erlauben? Grüße Thomas
Am Samstag, 22. April 2006 20:24 schrieb Thomas Ohms:
Gibt es eine Möglichkeit in OpenSSH den Login mit Passwort gänzlich zu verbieten und nur Schlüssel zu erlauben?
Geht relativ einfach http://suse-linux-faq.koehntopp.de/q/q-ssh-without_passwd.html HTH Wolf -- * Registered Linux user #37136 http://counter.li.org * SL 10, AMD Sempron 2800+, SIS 748 * ATI Radeon 9250, 1GB/240GB, SB Audigy 2 ZS * Toshiba M40X, Canon Lide 20, Canon Pixma iP4000
Am Samstag, 22. April 2006 20:34 schrieb Wolf-Rüdiger Jürgens:
Am Samstag, 22. April 2006 20:24 schrieb Thomas Ohms:
Gibt es eine Möglichkeit in OpenSSH den Login mit Passwort gänzlich zu verbieten und nur Schlüssel zu erlauben?
Geht relativ einfach http://suse-linux-faq.koehntopp.de/q/q-ssh-without_passwd.html
HTH Wolf -- * Registered Linux user #37136 http://counter.li.org * SL 10, AMD Sempron 2800+, SIS 748 * ATI Radeon 9250, 1GB/240GB, SB Audigy 2 ZS * Toshiba M40X, Canon Lide 20, Canon Pixma iP4000
Ist glaub nicht ganz das was ich meinte/suche. Ich habe ja einen Key und muss somit kein Passwort eingeben. Gleichzeitig möchte ich dem SSH-Dämon aber auch verständlich machen, dass er eben NUR einen passenden Key und NIE Login mit Passwort akzeptiert. Geht das? Gruß Thomas
Hi,
On 4/22/06, Thomas Ohms
Ist glaub nicht ganz das was ich meinte/suche. Ich habe ja einen Key und muss somit kein Passwort eingeben. Gleichzeitig möchte ich dem SSH-Dämon aber auch verständlich machen, dass er eben NUR einen passenden Key und NIE Login mit Passwort akzeptiert. Geht das?
Ja, in der /etc/ssh/sshd_config einfach PubkeyAuthentication yes PasswordAuthentication no HTH, Johannes
* Johannes M. Posel schrieb:
Ja, in der /etc/ssh/sshd_config einfach
PubkeyAuthentication yes PasswordAuthentication no
bei mir steht immer schon (Suse 9.2-Standard-Installation) PasswordAuthentication no Warum geht dann trotzdem ssh-Anmeldung von anderen PCs auf diesen? BTW: #PubkeyAuthentication yes .. ist auskommentiert (Suse 9.2-Standard....) Ekkard
Am Samstag, 22. April 2006 23:40 schrieb Ekkard Gerlach:
* Johannes M. Posel schrieb:
Ja, in der /etc/ssh/sshd_config einfach
PubkeyAuthentication yes PasswordAuthentication no
bei mir steht immer schon (Suse 9.2-Standard-Installation) PasswordAuthentication no
Warum geht dann trotzdem ssh-Anmeldung von anderen PCs auf diesen?
BTW: #PubkeyAuthentication yes .. ist auskommentiert (Suse 9.2-Standard....)
Ekkard
Das gleiche Problem habe ich auch und ich hab es extra auskommentiert.
Am Samstag, 22. April 2006 23:40 schrieb Ekkard Gerlach:
* Johannes M. Posel schrieb:
Ja, in der /etc/ssh/sshd_config einfach
PubkeyAuthentication yes PasswordAuthentication no
bei mir steht immer schon (Suse 9.2-Standard-Installation) PasswordAuthentication no
Warum geht dann trotzdem ssh-Anmeldung von anderen PCs auf diesen?
Deshalb (aus meiner SL 9.2 sshd_config): # 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 mechanism. # Depending on your PAM configuration, this may bypass the setting of # PasswordAuthentication, PermitEmptyPasswords, and # "PermitRootLogin without-password". If you just want the PAM account and # session checks to run without PAM authentication, then enable this but set # ChallengeResponseAuthentication=no UsePAM yes HTH Jan -- If you make people think they're thinking, they'll love you. But if you really make them think they'll hate you.
Am Sonntag, 23. April 2006 00:36 schrieb Jan Ritzerfeld:
Am Samstag, 22. April 2006 23:40 schrieb Ekkard Gerlach:
* Johannes M. Posel schrieb:
Ja, in der /etc/ssh/sshd_config einfach
PubkeyAuthentication yes PasswordAuthentication no
bei mir steht immer schon (Suse 9.2-Standard-Installation) PasswordAuthentication no
Warum geht dann trotzdem ssh-Anmeldung von anderen PCs auf diesen?
Deshalb (aus meiner SL 9.2 sshd_config): # 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 mechanism. # Depending on your PAM configuration, this may bypass the setting of # PasswordAuthentication, PermitEmptyPasswords, and # "PermitRootLogin without-password". If you just want the PAM account and # session checks to run without PAM authentication, then enable this but set # ChallengeResponseAuthentication=no UsePAM yes
HTH Jan Bingo, genau das war's. :) Danke Dir Jan!
Am Samstag, 22. April 2006 20:41 schrieb Thomas Ohms:
Ist glaub nicht ganz das was ich meinte/suche. Ich habe ja einen Key und muss somit kein Passwort eingeben. Gleichzeitig möchte ich dem SSH-Dämon aber auch verständlich machen, dass er eben NUR einen passenden Key und NIE Login mit Passwort akzeptiert. Geht das?
Das steht dort ebenfalls in der FAQ http://suse-linux-faq.koehntopp.de/q/q-ssh-keyonly.html Wolf -- * Registered Linux user #37136 http://counter.li.org * SL 10, AMD Sempron 2800+, SIS 748 * ATI Radeon 9250, 1GB/240GB, SB Audigy 2 ZS * Toshiba M40X, Canon Lide 20, Canon Pixma iP4000
* Thomas Ohms schrieb:
Gibt es eine M=F6glichkeit in OpenSSH den Login mit Passwort g=E4nzlich zu= =20 verbieten und nur Schl=FCssel zu erlauben?
es geht auf jeden Fall nur bestimmten Usern ssh-Zugang zu gewähren: /etc/sshd_config: AllowUsers *@192.168.0.* gerlach root thomas Ekkard
Am Samstag, 22. April 2006 23:35 schrieb Ekkard Gerlach:
* Thomas Ohms schrieb:
Gibt es eine M=F6glichkeit in OpenSSH den Login mit Passwort g=E4nzlich zu= =20 verbieten und nur Schl=FCssel zu erlauben?
es geht auf jeden Fall nur bestimmten Usern ssh-Zugang zu gewähren:
/etc/sshd_config: AllowUsers *@192.168.0.* gerlach root thomas
Ekkard Gute Idee für ein lokales Netzwerk, aber leider nicht möglich - wie in meinem Fall - für einen Remotezugriff und dynamischen IPs. :(
participants (5)
-
Ekkard Gerlach
-
Jan Ritzerfeld
-
Johannes M. Posel
-
Thomas Ohms
-
Wolf-Rüdiger Jürgens