Die Technik entwickelt sich immer mehr vom Primitiven über das Komplizierte zum Einfachen.

Antoine de Saint-Exupéry, französischer Schriftsteller und Flieger (1900 – 1944)

Sophos oder Google Authenticator für SSH nutzen

Sophos oder Google Authenticator für SSH nutzen

Um eine Zwei-Wege-Authentifizierung für SSH hinzubekommen braucht es unter Debian (& Co.) nur ein paar Schritte :

# apt install libpam-google-authenticator

in der /etc/pam.d/sshd ankleben:

auth required pam_google_authenticator.so

in der /etc/ssh/sshd_config ändern:

ChallengeResponseAuthentication yes

dann für die ssh Nutzer jeweils einmal:

# google-authenticator

Do you want authentication tokens to be time-based (y/n) y

Do you want me to update your "^/.google_authenticator" file (y/n) y

Do you want to disallow multiple uses of the same authentication
token? This restricts you to one login about every 30s, but it increases
your chances to notice or even prevent man-in-the-middle attacks (y/n) y

By default, tokens are good for 30 seconds. In order to compensate for
possible time-skew between the client and the server, we allow an extra
token before and after the current time. If you experience problems with
poor time synchronization, you can increase the window from its default
size of +-1min (window size of 3) to about +-4min (window size of
17 acceptable tokens).
Do you want to do so? (y/n) n

If the computer that you are logging into isn't hardened against brute-force
login attempts, you can enable rate-limiting for the authentication module.
By default, this limits attackers to no more than 3 login attempts every 30s.
Do you want to enable rate-limiting (y/n) y

Das ganze aktivieren:

# service sshd restart


Zurück zur Übersicht
Teamviewer Logo
Watchguard Sign
Intelligente Sicherheit leicht gemacht.

Next Generation VoIP
Sophos Sign
Security made simple
1&1 Shop
Telekom Shop