Site Tools


2fa

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
2fa [2024/05/03 17:25] – -formatting, condense hogwild2fa [2024/05/03 18:01] hogwild
Line 1: Line 1:
 ====== Setting up 2FA for SSH using GoogleAuthenticator ====== ====== Setting up 2FA for SSH using GoogleAuthenticator ======
  
-[FIXME] This is simply content taken from the following forum thread: \\ [[https://www.linksysinfo.org/index.php?threads/howto-set-up-2fa-openssh-with-google-authenticator.78183/#post-345032]]+This is content taken from the following forum thread: \\ [[https://www.linksysinfo.org/index.php?threads/howto-set-up-2fa-openssh-with-google-authenticator.78183/#post-345032]]
  
-These are simple configuration notes. This is not intended to be a complete HOWTO. +These are simple configuration notes and are not intended to be a complete HOWTO.
- +
-\\+
  
 This setup uses openssh with google-authenticator as 2-Factor Authentication. Only the root user is supported. This setup uses openssh with google-authenticator as 2-Factor Authentication. Only the root user is supported.
- 
-Prerequisites : - setup entware (not covered here) \\ 
  
  \\  \\
 +
 +Prerequisite: Install/setup entware. This is not covered here. <Link?> \\
 +
 + \\ First, we install openssh-server and google-authenticator:
  
     opkg install openssh-server-pam google-authenticator-libpam     opkg install openssh-server-pam google-authenticator-libpam
  
-(hopefully this should cover all the dependencies) - enable openssh server (not covered here)+Hopefully this will include all dependencies. \\
  
-now the configs:+ \\ 
 + 
 +Next, we enable openssh-server . This is not covered here. <Link?> \\  \\
  
-/opt/etc/init.d/S39pre_ssh+Next, we configure the correct settings in configuration file /opt/etc/init.d/S39pre_ssh : \\  \\
  
     #!/bin/sh     #!/bin/sh
Line 46: Line 48:
     exit 0     exit 0
  
-this new service needs to be enabled at boot-time as well+ \\ 
 + 
 +The new service must be enabled at boot time as well:
  
-/opt/etc/ssh/sshd_config (only what's changed from the default - I believe)+/opt/etc/ssh/sshd_config (most likely only what's changed from the default)
  
     Port 2222 # to be changed if desired     Port 2222 # to be changed if desired
2fa.txt · Last modified: 2024/05/03 18:40 by hogwild