2 Factor Authentication for Linux: Difference between revisions
From KlavoWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
'''Note''': You will need to edit the build and change the kernel from x686 and x386 to all | '''Note''': You will need to edit the build and change the kernel from x686 and x386 to all | ||
= Raspbian = | |||
The following enforces 2 factor authentication for SSH log-on's and not for the console. | |||
<pre> | |||
apt-get install libpam-google-authenticator | |||
</pre> | |||
== sshd_config == | |||
<pre> | |||
vi /etc/ssh/sshd_config | |||
</pre> | |||
on line 48 change ChallengeResponseAuthentication to yes. | |||
<pre> | |||
ChallengeResponseAuthentication yes | |||
</pre> | |||
== sshd == | |||
<pre> | |||
vi /etc/pam.d/sshd | |||
</pre> | |||
add the following line to line number 15 | |||
<pre> | |||
auth required pam_google_authenticator.so | |||
</pre> | |||
You can add the line to line position number 9 if you prefer the auth code asked before the password. | |||
[[Category : Linux]] | [[Category : Linux]] |
Revision as of 07:32, 21 January 2014
Arch Linux
I'll do up a more detailed document but I followed these instruction
https://wiki.archlinux.org/index.php/Google_Authenticator
Install yaourt if not already installed.
pacman -S yaourt
yaourt -S google-authenticator-libpam-git
Note: You will need to edit the build and change the kernel from x686 and x386 to all
Raspbian
The following enforces 2 factor authentication for SSH log-on's and not for the console.
apt-get install libpam-google-authenticator
sshd_config
vi /etc/ssh/sshd_config
on line 48 change ChallengeResponseAuthentication to yes.
ChallengeResponseAuthentication yes
sshd
vi /etc/pam.d/sshd
add the following line to line number 15
auth required pam_google_authenticator.so
You can add the line to line position number 9 if you prefer the auth code asked before the password.