- relates to https://github.com/docker/docs/pull/23230
- fixes https://github.com/docker/docs/issues/23298
The old page was removed in f77ddf3728,
but didn't add a redirect.
<!--Delete sections as needed -->
## Description
<!-- Tell us what you did and why -->
## Related issues or tickets
<!-- Related issues, pull requests, or Jira tickets -->
## Reviews
<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->
- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2.9 KiB
title, linkTitle, description, keywords, weight, aliases
| title | linkTitle | description | keywords | weight | aliases | ||||
|---|---|---|---|---|---|---|---|---|---|
| Enable two-factor authentication for your Docker account | Two-factor authentication | Enable or disable two-factor authentication on your Docker account for enhanced security and account protection | two-factor authentication, 2FA, docker hub security, account security, TOTP, authenticator app, disable 2FA | 20 |
|
Two-factor authentication (2FA) adds an essential security layer to your Docker account by requiring a unique security code in addition to your password when signing in. This prevents unauthorized access even if your password is compromised.
When you turn on two-factor authentication, Docker provides a unique recovery code specific to your account. Store this code securely as it lets you recover your account if you lose access to your authenticator app.
Key benefits
Two-factor authentication significantly improves your account security:
- Protection against password breaches: Even if your password is stolen or leaked, attackers can't access your account without your second factor.
- Secure CLI access: Required for Docker CLI authentication when 2FA is turned on, ensuring automated tools use personal access tokens instead of passwords.
- Compliance requirements: Many organizations require 2FA for accessing development and production resources.
- Peace of mind: Know that your Docker repositories, images, and account settings are protected by industry-standard security practices.
Prerequisites
Before turning on two-factor authentication, you need:
- A smartphone or device with a Time-based One-time password (TOTP) authenticator app installed
- Access to your Docker account password
Enable two-factor authentication
To turn on 2FA for your Docker account:
- Sign in to your Docker account.
- Select your avatar and then from the drop-down menu, select Account settings.
- Select 2FA.
- Enter your account password, then select Confirm.
- Save your recovery code and store it somewhere safe. You can use your recovery code to recover your account in the event you lose access to your authenticator app.
- Use a TOTP mobile app to scan the QR code or enter the text code.
- Once you've linked your authenticator app, enter the six-digit code in the text-field.
- Select Enable 2FA.
Two-factor authentication is now active on your account. You'll need to enter a security code from your authenticator app each time you sign in.
Disable two-factor authentication
Warning
Disabling two-factor authentication results in decreased security for your Docker account.
- Sign in to your Docker account.
- Select your avatar and then from the drop-down menu, select Account settings.
- Select 2FA.
- Enter your password, then select Confirm.
- Select Disable 2FA.