How to Configure and Use Two-Factor Authentication in cPanel

With InMotion Hosting’s Business Class and Reseller Hosting, Two-Factor Authentication, or 2FA, is enabled by default. When 2FA is enabled, the additional authentication method can be configured to add a layer of security for logging into your cPanel account. Once configured, with a smartphone (via a third-party application, like Google Authenticator for Android, BlackBerry, and iOS or Microsoft Authenticator for Windows Phones), users will generate a secure code to authenticate their cPanel login, in addition to the cPanel user’s password. In this guide, you will learn how to configure Two-Factor Authentication for cPanel and how to log into cPanel using 2FA.

In This Tutorial:

How to Configure 2FA for cPanel

Configuring 2FA is simple via the cPanel interface. Follow the steps below to learn how to setup two-factor authentication.

For VPS and Dedicated servers, Two-Factor Authentication will need to be enabled from WHM.

  1. Log into cPanel as the user you want to configure 2FA for.
    cPanel login screen displayed with user name and password fields and Login button highlighted.
  2. In the cPanel search bar, type “two“.
    cPanel Search bar with two text entered and highlighted.
  3. Click on the Two-Factor Authentication icon.
    cPanel Security section with Two-Factor Authentication icon highlighted.
  4. Click the Set Up Two-Factor Authentication button to proceed.
    cPanel Two-Factor Authentication with Set Up Two-Factor Authentication button highlighted.
  5. Click one of the buttons below to expand and display instructions to use the QR (Quick Response) Code or Manual Entry to configure 2FA.

QR Code Method

  1. Use your smartphone to scan the QR Code displayed under Step 1.
    cPanel Set Up Two-Factor Authentication QR Code highlighted
  2. Enter the security code (displayed in your smartphone app) under Step 2 in the box labeled Security Code. Then, click the Configure Two-Factor Authentication button.
    Set Up 2FA QR Code Security Code and Two-Factor Authentication button highlighted.

Manual Entry Method

  1. Use your smartphone to manually enter the Account as it is displayed in the Manual Entry section of cPanel.
    cPanel Set Up Two-Factor Authentication Manual Entry Account field highlighted.
  2. Use your smartphone to manually enter the Key as it is displayed in the Manual Entry section of cPanel.
    cPanel Set Up Two-Factor Authentication Manual Entry Key field highlighted.
  3. Enter the security code (displayed in your smartphone app) under Step 2 in the box labeled Security Code. Then, click the Configure Two-Factor Authentication button.
    Set Up 2FA Manual Entry Security Code and Two-Factor Authentication button highlighted.
  4. Once successful, you will see the following message:
    cPanel Set Up Two-Factor Authentication success message displayed.

Now that you have configured this cPanel account to use 2FA, the cPanel user will be prompted to enter the security code (generated via the smartphone app) to log into cPanel.

How to Use 2FA to Log into cPanel

Once you have configured a cPanel user for 2FA, after entering the correct username and password combination to log into cPanel, a new page will load which prompts the user to enter the new security code generated from the smartphone app (used to set up 2FA). Follow the instructions below to log into cPanel, when using 2FA.

  1. On the cPanel login page, enter the user name and password combination. Then, click the Login button.
    cPanel login screen displayed with user name and password fields and Login button highlighted.
  2. Open the smartphone app to generate a new security code.
    iOS Google Authenticator App Example Screenshot Security Code highlighted.
  3. Enter the security code in the field labeled: “Enter the security code for {your user}”. Then, click the Continue button.
    cPanel 2FA Security Code field and Continue button highlighted

How to Remove 2FA from cPanel

If for some reason you are unable to log into cPanel after enabling 2FA, you can log into cPanel through your Account Management Panel (AMP). Once logged in, you can remove 2FA for the cPanel account. The following instructions will guide you through this process.

  1. Log into cPanel via your Account Management Panel (AMP).
    Account Management Panel (AMP) cPanel login icon highlighted.
  2. In the cPanel search bar, type “two“.
    cPanel Search bar with two text entered and highlighted.
  3. Click on the Two-Factor Authentication icon.
    cPanel Security section with Two-Factor Authentication icon highlighted.
  4. Click on the Remove Two-Factor Authentication button.
    cPanel Two-Factor Authentication Remove Two-Factor Authentication button highlighted.
  5. Now, click on the Remove button.
    cPanel Two-Factor Authentication Remove button highlighted.
  6. Once 2FA has been removed, you will receive the following message:
    cPanel Remove Two-Factor Authentication Success message highlighted.

Now that 2FA has been removed for the cPanel user, that user will no longer be prompted for a security code and can log into cPanel using simply the username and password.

Learn more about cPanel security from our Managed VPS Hosting Product Guide.

Secure VPS HostingEnjoy high-performance, lightning-fast servers with increased security and maximum up-time with our Secure VPS Hosting!

check markLinux VPS check markcPanel or Control Web Panel check markScalable check markWebsite Migration Assistance

Linux VPS Hosting

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

2 thoughts on “How to Configure and Use Two-Factor Authentication in cPanel

  1. How does one set up 2FA for email? Presently, I have 2FA set up on inmotionhosting.com for my main account and another 2FA on cPanel, but I can log into my email without using 2FA. How do I set that up? I don’t see instructions or any link to do that.

    1. Hi Cindy! While we do have 2FA for both cPanel and AMP, there is not currently a form of 2FA available for emails due to the way they are set up in cPanel. For those, we recommend a strong password.

Was this article helpful? Join the conversation!