Concepts / Identity

Identity

Multi-factor authentication

Also called MFA, 2FA, two-factor, TOTP, one-time password, OTP, authenticator app, Google Authenticator, oathtool, second factor

Requiring more than one kind of proof to log in, such as a password plus a time-based code from a device.

Both sides compute the same code
Both sides compute the same code

The app and the server share a secret once and both know the time, so each computes the same six digits. The secret is never sent at login, and a code stops working after about 30 seconds.

Multi-factor authentication asks for two different kinds of proof at login: something you know (a password), have (a phone) or are (a fingerprint). The common second factor is TOTP: server and authenticator app share a secret once, and both turn it plus the current time into the same six-digit code, valid about 30 seconds (oathtool --totp). A leaked secret lets anyone make codes; hardware keys and passkeys never reveal one.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab