Skip to content

Commit

Permalink
Merge pull request #484 from NethServer/ssh_2fa
Browse files Browse the repository at this point in the history
Describe 2FA for SSH
  • Loading branch information
gsanchietti committed Mar 25, 2020
2 parents e5bb54b + 22a5859 commit 5025df0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions administrator-manual/en/base_system2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ under :guilabel:`Settings` page, then following these steps:
3. generate a new code and copy it inside :guilabel:`Verification code` field, than click :guilabel:`Check code`
4. if the verification code is correct, click on the :guilabel:`Save` button

Two-factor authentication can be enabled for:

- the new Server Manager
- SSH when using username and password (access with public key will never require 2FA)

Recovery codes
--------------

Expand Down Expand Up @@ -304,5 +309,20 @@ a serial cable or a VNC-like connection for virtual machines:

1. access the system with user name and password
2. execute: ::

rm -f ~/.2fa.secret
sudo /sbin/e-smith/signal-event -j otp-save

Eventually, the root user can retrieve recovery codes for a user.
Use the following command and replace ``<user>`` with the actual user name : ::

oathtool -w 4 $(cat ~<user>/.2fa.secret)

Example for user ``goofy``: ::

# oathtool -w 4 $(cat ~goofy/.2fa.secret)
984147
754680
540025
425645
016250

0 comments on commit 5025df0

Please sign in to comment.