Get a Quote   (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

Using Two-Factor Authentication

  2 minute read.

Last Modified 2022-05-09 15:05 EDT

We recommend two-factor authentication (2FA) for increased security. TrueNAS offers 2FA to ensure that a compromised administrator (root) password alone cannot grant access to the administrator interface. To utilize 2FA, you need a mobile device with Google Authenticator installed.

Two-factor authentication (2FA) is an extra layer of security that prevents someone from logging in, even if they have your password. This extra security measure requires you to verify your identity using a randomized 6-digit code that regenerates every 30 seconds (unless modified).

Setting Up Two-Factor Authentication.

Set up a second 2FA device as a backup before proceeding.

Go to System > 2FA and click ENABLE TWO-FACTOR AUTHENTICATION. Then, click CONFIRM.

System2FAOptionsNoSSH

Click SHOW QR, then scan it using Google Authenticator on the mobile device.

System2FAQRCode

Using 2FA to Log In to TrueNAS

Enabling 2FA changes the login process for both the TrueNAS web interface and SSH logins:

Web UI Login

Login2FA

The login screen has another field for the randomized authenticator code. If this field isn’t immediately visible, refresh the browser.

Enter the code from the mobile device (complete without the space) in the login window with the root username and password.

SSH Login

SSHConnect2FA

Set Enable Two-Factor Auth for SSH in System > 2FA, then go to Services > SSH and click .

Set Log in as Root with Password and click SAVE. Toggle the SSH service and wait for the status to show that it is RUNNING.

Open a Command Prompt or Terminal and SSH into TrueNAS using the system hostname or IP address, root account username and password, and the 2FA code from the mobile device.