{"id":209,"date":"2024-03-30T15:43:52","date_gmt":"2024-03-30T10:13:52","guid":{"rendered":"https:\/\/mumbaiwebhosting.co.in\/articles\/?p=209"},"modified":"2024-03-30T15:57:46","modified_gmt":"2024-03-30T10:27:46","slug":"two-factor-authentication-in-cpanel","status":"publish","type":"post","link":"https:\/\/mumbaiwebhosting.co.in\/articles\/two-factor-authentication-in-cpanel\/","title":{"rendered":"Two factor Authentication in cpanel"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/Two-factor-authentication--1024x557.png\" alt=\"\" class=\"wp-image-210\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/Two-factor-authentication--1024x557.png 1024w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/Two-factor-authentication--300x163.png 300w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/Two-factor-authentication--768x418.png 768w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/Two-factor-authentication-.png 1038w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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=\"#log-in-to-c-panel\">Log in to cPanel:<\/a><\/li><li><a href=\"#access-two-factor-authentication-settings\">Access Two Factor Authentication Settings:<\/a><\/li><li><a href=\"#enable-two-factor-authentication\">Enable Two-Factor Authentication:<\/a><\/li><li><a href=\"#choose-authentication-method\">Choose Authentication Method:<\/a><\/li><li><a href=\"#scan-qr-code-or-enter-secret-key\">Scan QR Code or Enter Secret Key:<\/a><\/li><li><a href=\"#verify-authentication\">Verify Authentication:<\/a><\/li><li><a href=\"#save-settings-and-test-2-fa\">Save Settings and Test 2FA:<\/a><\/li><li><a href=\"#backup-recovery-codes-optional\">Backup Recovery Codes (Optional):<\/a><\/li><li><a href=\"#remove-2-f-aauthentication-2-fa-via-command-line\">Remove 2F Aauthentication (2FA)\u00a0via command line:<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>Two Factor Authentication (2FA) adds an extra layer of security to your cPanel account by requiring not only a password but also a second form of verification before granting access. Here&#8217;s how to enable 2FA in cPanel:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"log-in-to-c-panel\"><strong>Log in to cPanel:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your web browser and navigate to your cPanel login URL (usually <code>https:\/\/yourdomain.com\/cpanel<\/code>).<\/li>\n\n\n\n<li>Enter your cPanel username and password to log in.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"access-two-factor-authentication-settings\"><strong>Access Two Factor Authentication Settings:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once logged in, look for the &#8220;Security&#8221; or &#8220;Two Factor Authentication&#8221; section within cPanel. It may be located under &#8220;Preferences&#8221; or &#8220;Account Settings.&#8221;<\/li>\n\n\n\n<li>Click on the &#8220;Two-Factor Authentication&#8221; or &#8220;2FA&#8221; option to access the settings.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"enable-two-factor-authentication\"><strong>Enable Two-Factor Authentication:<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"315\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-12.png\" alt=\"\" class=\"wp-image-216\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-12.png 967w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-12-300x98.png 300w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-12-768x250.png 768w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the Two Factor Authentication settings, you&#8217;ll typically find an option to enable or disable 2FA for your account.<\/li>\n\n\n\n<li>Click on the &#8220;Enable <a href=\"https:\/\/www.squarebrothers.com\/\" target=\"_blank\" rel=\"noopener\">Two-Factor Authentication<\/a> or similar button to start the setup process.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"choose-authentication-method\"><strong>Choose Authentication Method:<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"216\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-14-1024x216.png\" alt=\"\" class=\"wp-image-219\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-14-1024x216.png 1024w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-14-300x63.png 300w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-14-768x162.png 768w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-14.png 1050w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cPanel supports multiple authentication methods for 2FA, including Time-Based One-Time Password (TOTP) apps like Google Authenticator or Authy, as well as email-based authentication.<\/li>\n\n\n\n<li>Select your preferred authentication method from the available options.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scan-qr-code-or-enter-secret-key\"><strong>Scan QR Code or Enter Secret Key:<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"587\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-13.png\" alt=\"\" class=\"wp-image-217\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-13.png 737w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-13-300x239.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you&#8217;re using a TOTP app (e.g., Google Authenticator), you&#8217;ll need to scan the QR code displayed on the screen or manually enter the secret key into the app.<\/li>\n\n\n\n<li>If you&#8217;re using email-based authentication, cPanel will send a verification code to your email address.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"verify-authentication\"><strong>Verify Authentication:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once you&#8217;ve scanned the QR code or entered the secret key, the authentication app will generate a verification code.<\/li>\n\n\n\n<li>Enter the verification code into the appropriate field in cPanel to confirm setup.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"427\" height=\"727\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-15.png\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-15.png 427w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-15-176x300.png 176w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"607\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-16.png\" alt=\"\" class=\"wp-image-221\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-16.png 460w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-16-227x300.png 227w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"save-settings-and-test-2-fa\"><strong>Save Settings and Test 2FA:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After verifying authentication, make sure to save your settings.<\/li>\n\n\n\n<li>Test the <a href=\"http:\/\/mumbaiwebhosting.co.in\">2FA<\/a> setup by logging out of cPanel and logging back in. You should be prompted to enter a verification code from your authentication app or email.<\/li>\n\n\n\n<li>In case the\u00a0Scan a barcode\u00a0option is chosen, the camera app will open and you will need to place the QR code from the cPanel within the red lines displayed.<\/li>\n\n\n\n<li>It is also possible to use the\u00a0Enter a provided key\u00a0option. You will be prompted to the next page where you will need to enter the following details previously specified in the cPanel:<\/li>\n\n\n\n<li>Account name<\/li>\n\n\n\n<li>Your key<\/li>\n\n\n\n<li>The key can be either\u00a0time-based\u00a0or\u00a0counter-based. With the\u00a0time-based\u00a0option, the 2FA app generates a new six-digit security code for your cPanel account every 30 seconds. With the\u00a0counter-based\u00a0key, you tap a button, which then asks for the next number.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"376\" height=\"452\" src=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-17.png\" alt=\"\" class=\"wp-image-224\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-17.png 376w, https:\/\/mumbaiwebhosting.co.in\/articles\/wp-content\/uploads\/2024\/03\/image-17-250x300.png 250w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"backup-recovery-codes-optional\"><strong>Backup Recovery Codes (Optional):<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cPanel may provide backup recovery codes that you can use to regain access to your account if you lose access to your authentication device.<\/li>\n\n\n\n<li>It&#8217;s recommended to save these recovery codes in a secure location.<\/li>\n<\/ul>\n\n\n\n<p>By enabling Two-Factor Authentication in cPanel, you add an additional layer of security to your account, helping to prevent unauthorized access and protect sensitive data. It&#8217;s an essential security measure for enhancing the overall security posture of your cPanel hosting environment.<\/p>\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>\u00a0<strong>via command line<\/strong>:<\/h2>\n\n\n\n<p>. Run the below command as root user to disable 2FA via terminal: whmapi1 twofactorauth_disable_policy .<\/p>\n\n\n\n<p>If it helps, access the server remotely as root user and follow the below steps:<\/p>\n\n\n\n<p>cd \/var\/cpanel\/authn\/twofactor_auth<\/p>\n\n\n\n<p>and rename the .json files to something else or simply run the below command :<\/p>\n\n\n\n<p>mv -v \/var\/cpanel\/authn\/twofactor_auth\/tfa_userdata.json{,.bak}; echo \u2018{}\u2019 >> \/var\/cpanel\/authn\/twofactor_auth\/tfa_userdata.jso<strong>Posted in\u00a0cPanel,\u00a02FA,\u00a0Two-Factor Authentication<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two Factor Authentication (2FA) adds an extra layer of security to your cPanel account by requiring not only a password but also a second form of verification before granting access. Here&#8217;s how to enable 2FA in cPanel: Log in to cPanel: Access Two Factor Authentication Settings: Enable Two-Factor Authentication: Choose Authentication Method: Scan QR Code [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-two-factor-authentication"],"_links":{"self":[{"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":7,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/posts\/209\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/articles\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}