{"id":178,"date":"2024-01-20T08:05:07","date_gmt":"2024-01-20T08:05:07","guid":{"rendered":"https:\/\/vpswebhostingindia.in\/blog\/?p=178"},"modified":"2024-01-20T08:36:41","modified_gmt":"2024-01-20T08:36:41","slug":"two-factor-authentication-in-cpanel","status":"publish","type":"post","link":"https:\/\/vpswebhostingindia.in\/blog\/two-factor-authentication-in-cpanel\/","title":{"rendered":"Two-Factor Authentication in cPanel"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This article explains how to set up two-factor authentication for your cPanel account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If enabled on your server, you have the ability to add an additional layer of protection to your cPanel account. Normally, your cPanel account is protected by a username and a password, but it is possible to enable another layer of authentication on top of that. This is known as two-factor authentication as there are two different types of authentication required in order to access your account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This additional protection will require you to enter a constantly changing 6-digit security code in addition to your username and password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two-Factor Authentication (2FA) is an improved security measure that requires two forms of identification: your password and a generated security code. With 2FA enabled, an application on your smartphone will provide you with a code that you must enter with your password to log in. Without your smartphone, you cannot log in.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#enabling-two-factor-authentication-in-the-c-panel-google-authenticator\">Enabling Two-Factor Authentication in the cPanel Google Authenticator<\/a><\/li><li><a href=\"#logging-into-the-c-panel\">Logging into the cPanel<\/a><\/li><li><a href=\"#disabling-two-factor-authentication-in-c-panel\">Disabling Two-Factor Authentication in cPanel<\/a><\/li><li><a href=\"#remove-2-f-aauthentication-2-fa-via-command-line\">Remove 2F Aauthentication (2FA) via command line<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"enabling-two-factor-authentication-in-the-c-panel-google-authenticator\">Enabling Two-Factor Authentication in the cPanel Google Authenticator<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Two-Factor Authentication menu can be found in the&nbsp;<em>cPanel &gt;&gt; Security &gt;&gt; Two-Factor Authentication<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/namecheap.simplekb.com\/SiteContents\/2-7C22D5236A4543EB827F3BD8936E153E\/media\/2FA1.1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Go to the&nbsp;<strong>Two-Factor Authentication<\/strong>&nbsp;menu and click on the&nbsp;<strong>Set Up Two-Factor Authentication<\/strong>&nbsp;button:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/namecheap.simplekb.com\/SiteContents\/2-7C22D5236A4543EB827F3BD8936E153E\/media\/enabling_2fa_cPanel2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To configure 2FA, you should link your cPanel account and <strong>Google Authenticator<\/strong>&nbsp;app<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are 2 ways to connect the app:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"457\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-18.png\" alt=\"\" class=\"wp-image-210\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-18.png 563w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-18-300x244.png 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a><strong>Google Authenticator<\/strong><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you proceed with the&nbsp;<a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.apps.authenticator2&amp;hl=en&amp;gl=US\" rel=\"nofollow noopener\" target=\"_blank\"><strong>Google Authenticator<\/strong>&nbsp;<strong>App<\/strong><\/a>, you will see the following start page. Choose&nbsp;<strong>Begin&nbsp;<\/strong>to further set up the app:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"855\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-7.png\" alt=\"\" class=\"wp-image-190\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-7.png 513w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-7-180x300.png 180w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In case you already have a key added, you will need to press on the &#8220;<strong>+<\/strong>&#8221; button to add a new key:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"887\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-6.png\" alt=\"\" class=\"wp-image-188\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-6.png 510w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-6-172x300.png 172w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can add an account by\u00a0<strong>Scanning a barcode<\/strong>\u00a0or\u00a0<strong>Entering a provided key<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"390\" height=\"648\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-17.png\" alt=\"\" class=\"wp-image-209\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-17.png 390w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-17-181x300.png 181w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In case the&nbsp;<strong>Scan a barcode<\/strong>&nbsp;option is chosen, the camera app will open and you will need to place the QR code from the cPanel within the red lines displayed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is also possible to use the&nbsp;<strong>Enter a provided key<\/strong>&nbsp;option. You will be prompted to the next page where you will need to enter the following details previously specified in the cPanel:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Account name<\/li>\n\n\n\n<li>Your key<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The key can be either\u00a0<strong>time-based<\/strong>\u00a0or\u00a0<strong>counter-based<\/strong>. With the\u00a0<strong>time-based\u00a0<\/strong>option, the 2FA app generates a new six-digit security code for your cPanel account every 30 seconds. With the\u00a0<strong>counter-based<\/strong>\u00a0key, you tap a button, which then asks for the next number.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"392\" height=\"659\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-16.png\" alt=\"\" class=\"wp-image-208\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-16.png 392w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/image-16-178x300.png 178w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After the key is added to the&nbsp;<strong>Google Authenticator<\/strong>&nbsp;app, you may proceed with further configurations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"logging-into-the-c-panel\">Logging into the cPanel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After the app is installed and connected to the cPanel, continue by entering the six-digit security code into the&nbsp;<em>cPanel &gt;&gt; Security &gt;&gt; Two-Factor Authentication &gt;&gt; Step 2 &gt;&gt; Security code<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/namecheap.simplekb.com\/SiteContents\/2-7C22D5236A4543EB827F3BD8936E153E\/media\/logging_into_cPanel1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You should receive the following success message:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/namecheap.simplekb.com\/SiteContents\/2-7C22D5236A4543EB827F3BD8936E153E\/media\/logging_into_cPanel2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">During the next cPanel login, after you enter your username and password, you will be redirected to the next page to enter the security code:<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"276\" height=\"296\" data-id=\"183\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-133000-1.png\" alt=\"Two-Factor Authentication\" class=\"wp-image-183\"\/><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"disabling-two-factor-authentication-in-c-panel\">Disabling Two-Factor Authentication in cPanel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you have two-factor authentication enabled and you have a working authenticator, you can turn off this feature when logged into cPanel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong> Log into cPanel provided by <a href=\"https:\/\/vpswebhostingindia.in\/vps_hosting\/\">hosting<\/a> provider. Typically, you can do this via a URL like:&nbsp;<em>https:\/\/DOMAIN.COM\/cpanel<\/em>&nbsp;(Replace&nbsp;<em>DOMAIN.COM&nbsp;<\/em>with your cPanel main domain name.)<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"416\" height=\"460\" data-id=\"173\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/cpanel.png\" alt=\"\" class=\"wp-image-173\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/cpanel.png 416w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/cpanel-271x300.png 271w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: <\/strong>In cPanel&#8217;s search box, type &#8220;factor&#8221; or &#8220;two&#8221; and select&nbsp;<strong>Two-Factor Authentication<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"103\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1-1024x103.png\" alt=\"\" class=\"wp-image-186\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1-1024x103.png 1024w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1-300x30.png 300w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1-768x77.png 768w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1-1536x154.png 1536w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-135041-1.png 1906w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong> Click&nbsp;<strong>Remove&nbsp;Two-Factor Authentication&nbsp;<\/strong>to disable it.<br><img decoding=\"async\" height=\"136\" src=\"https:\/\/www.hostdime.com\/kb\/hd\/files\/19955872\/19955877\/1\/1557949523000\/2FA+cPanel+Reconfigure+or+Remove+Buttons.png\" alt=\"Click the Red Remove Two-Factor Authentication Button\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the feature is disabled, remove the entry from any of your authentication applications, as those login tokens will no longer be good.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"307\" src=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-134005-1024x307.png\" alt=\"\" class=\"wp-image-184\" srcset=\"https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-134005-1024x307.png 1024w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-134005-300x90.png 300w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-134005-768x230.png 768w, https:\/\/vpswebhostingindia.in\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-20-134005.png 1229w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"remove-2-f-aauthentication-2-fa-via-command-line\"><strong>Remove 2F Aauthentication (2FA)<\/strong> via command line<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Run the below command as root user to disable 2FA via terminal: whmapi1 twofactorauth_disable_policy .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If it helps, access the server remotely as root user and follow the below steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">cd \/var\/cpanel\/authn\/twofactor_auth<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and rename the .json files to something else or simply run the below command :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">mv -v \/var\/cpanel\/authn\/twofactor_auth\/tfa_userdata.json{,.bak}; echo \u2018{}\u2019 &gt;&gt; \/var\/cpanel\/authn\/twofactor_auth\/tfa_userdata.jso<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to set up two-factor authentication for your cPanel account. If enabled on your server, you have the ability to add an additional layer of protection to your cPanel account. Normally, your cPanel account is protected by a username and a password, but it is possible to enable another layer of authentication [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":204,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"_eb_attr":"","footnotes":""},"categories":[11,13,12],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-2fa","category-two-factor-authentication"],"_links":{"self":[{"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":8,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":213,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions\/213"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/media\/204"}],"wp:attachment":[{"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpswebhostingindia.in\/blog\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}