2016-02-11

‎sshd Configuration

← Older revision

Revision as of 09:49, 11 February 2016

(One intermediate revision by the same user not shown)

Line 8:

Line 8:

{{Related|Google Authenticator}}

{{Related|Google Authenticator}}

{{Related articles end}}

{{Related articles end}}



<!--

+

'''One Time PassWord''' ('''OTPW''') je PAM modul, který zprostředkuje použití hesel "na jedno použití" k přihlášení do systému. Tohle se hodí zejména v kontextu Secure shell, a to umožnění přihlášení z veřejných nebo sdílených počítačů, za pomoci jednorázových hesel, které nebudou nikdy fungovat znova.

'''One Time PassWord''' ('''OTPW''') je PAM modul, který zprostředkuje použití hesel "na jedno použití" k přihlášení do systému. Tohle se hodí zejména v kontextu Secure shell, a to umožnění přihlášení z veřejných nebo sdílených počítačů, za pomoci jednorázových hesel, které nebudou nikdy fungovat znova.

Line 37:

Line 37:

=== sshd Configuration ===

=== sshd Configuration ===



OTPW používá interaktivní přihlášení pro SHH připojení, které
jsou povolení
přidáním těchto řádek do {{ic|/etc/ssh/sshd_config}}:

+

OTPW používá interaktivní přihlášení pro SHH připojení, které
je povoleno
přidáním těchto řádek do {{ic|/etc/ssh/sshd_config}}:

UsePAM yes

UsePAM yes

UsePrivilegeSeparation yes

UsePrivilegeSeparation yes

Line 45:

Line 45:

Pokud si přejete používat také statická hesla, ujistěte se, že obsahuje řádek jako tento:

Pokud si přejete používat také statická hesla, ujistěte se, že obsahuje řádek jako tento:



If you wish to allow static password logins as well, ensure {{ic|/etc/ssh/sshd_config}} contains a line like this:

+

<!--
If you wish to allow static password logins as well, ensure {{ic|/etc/ssh/sshd_config}} contains a line like this:

PasswordAuthentication yes

PasswordAuthentication yes

Otherwise, set it to '''no'''. See the above info on editing {{ic|/etc/pam.d/sshd}} to fully disable static password auth, as PAM will otherwise allow a static password if OTPW fails (e.g. when a user runs out of passwords).

Otherwise, set it to '''no'''. See the above info on editing {{ic|/etc/pam.d/sshd}} to fully disable static password auth, as PAM will otherwise allow a static password if OTPW fails (e.g. when a user runs out of passwords).

Line 72:

Line 72:

Then simply enter your prefix, and the three requested passwords in the order they are requested in. When a login is initiated, OTPW creates a file {{Ic|~/.otpw.lock}} to detect concurrent logins. If a second login is initiated when this file exists, OTPW will request the three passwords.

Then simply enter your prefix, and the three requested passwords in the order they are requested in. When a login is initiated, OTPW creates a file {{Ic|~/.otpw.lock}} to detect concurrent logins. If a second login is initiated when this file exists, OTPW will request the three passwords.



{{Note |1= Due to a [https://bugzilla.mindrot.org/show_bug.cgi?id=632 bug] in the way OpenSSH calls PAM, the {{Ic|~/.otpw.lock}} file will not be deleted if the user cancels an SSH login using Ctrl-C or the like, and OTPW will always ask for triple passwords after this. The bug is marked as fixed, but it still affects me. As a workaround, one may simply delete the lock file manually, and OTPW will resume normal single-password requests.}}

+

{{Note |1= Due to a [https://bugzilla.mindrot.org/show_bug.cgi?id=632 bug] in the way OpenSSH calls PAM, the {{Ic|~/.otpw.lock}} file will not be deleted if the user cancels an SSH login using Ctrl-C or the like, and OTPW will always ask for triple passwords after this. The bug is marked as fixed, but it still affects me. As a workaround, one may simply delete the lock file manually, and OTPW will resume normal single-password requests.}}
-->

Show more