{"id":389,"date":"2024-02-14T21:19:00","date_gmt":"2024-02-14T19:19:00","guid":{"rendered":"https:\/\/hosting.in.ua\/blog\/?p=389"},"modified":"2025-10-14T21:23:31","modified_gmt":"2025-10-14T18:23:31","slug":"two-factor-user-authentication-how-it-works","status":"publish","type":"post","link":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/","title":{"rendered":"Two-factor user authentication \u2013 how it works"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The level of Internet security when working with various types of information systems is closely related to the user authentication system, which may include one or several layers of protection. The more layers there are, the more reliable the protection. Let\u2019s take a look at the principles of organizing <strong>two-factor authentication<\/strong> for protecting a workstation running <strong>Ubuntu<\/strong>, using the well-known <strong>Google Authenticator<\/strong> application as an example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Simple Authentication Systems<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">User authentication systems are used in almost all commercial and non-commercial software products and services, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database Management Systems (DBMS);<\/li>\n<li>Email services;<\/li>\n<li>Banking systems;<\/li>\n<li>Operating Systems (OS);<\/li>\n<li>Network services and hardware.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Until recently, most of these programs and services supported only <strong>single-factor<\/strong> credential protection, where <strong>one access password<\/strong> stored in a database was used for user identification. If the entered password matched the record in the database, the user was authorized and granted access to resources according to their permissions. Otherwise, access was denied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, such systems quickly became targets of cyberattacks, and it became evident that <strong>a single password is not enough<\/strong> to ensure a proper level of security \u2014 even if the credentials are encrypted using algorithms such as <strong>SHA-256<\/strong> or <strong>SHA-512<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem is that a simple authentication system relies on only <strong>one security factor (token)<\/strong> \u2014 the access password. It can be compromised \u2014 it\u2019s just a matter of time. Only by adding a <strong>second layer of protection<\/strong> or an <strong>additional token<\/strong> can security be significantly improved.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Systems with Enhanced Reliability<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Such systems include all those that use <strong>more than one security token<\/strong>.<br>You can add an additional level of protection to an existing software product or service by deploying <strong>third-party authentication modules<\/strong> and connecting an independent communication channel for token transmission \u2014 for example, a <strong>GSM mobile phone channel<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Today, similar systems are developed based on <strong>open-source OATH (Open Authentication)<\/strong> software and include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Command-line utilities;<\/li>\n<li>Linked function libraries;<\/li>\n<li><strong>PAM (Pluggable Authentication Module)<\/strong> components.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The most well-known examples are <strong>Google Authenticator<\/strong> and <strong>Yubico Authenticator Desktop<\/strong>.<br>Their working principles are similar, with differences mainly in the supported platforms and token generation algorithms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The token generation process is strictly defined by <strong>RFC specifications<\/strong>. The most commonly used algorithms are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HOTP<\/strong> \u2014 an algorithm for generating a sequence of random numbers;<\/li>\n<li><strong>TOTP<\/strong> \u2014 an algorithm that generates sequences of characters at defined time intervals.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When installing the software, the user can choose the desired type of algorithm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Google Authenticator<\/strong> is one of the most popular solutions of this type because it can be connected to almost any platform or service. For example, it can protect an <strong>email account<\/strong> or a <strong>Linux user account<\/strong> from unauthorized access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, let\u2019s look at an example of deploying Google Authenticator to protect a workstation running <strong>Ubuntu<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring Google Authenticator for Ubuntu<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Connecting Google Authenticator involves several steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install the <strong>Google Authenticator<\/strong> app on a mobile device.<\/li>\n<li>Configure the Ubuntu system files.<\/li>\n<li>Install the <strong>PAM module<\/strong> provided by the developers.<\/li>\n<li>Link the user account.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. Installing Google Authenticator on a Mobile Device<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The app is available for two platforms \u2014 <strong><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.apps.authenticator2\" target=\"_blank\" rel=\"noreferrer noopener\">Android<\/a><\/strong> and <strong><a href=\"https:\/\/itunes.apple.com\/ru\/app\/google-authenticator\/id388497605?mt=8\" target=\"_blank\" rel=\"noreferrer noopener\">iOS<\/a><\/strong>.<br>To install it, simply follow the corresponding link in your app store.<br>After clicking <strong>\u201cInstall\u201d<\/strong>, the installation process will begin, showing short explanations of how the app works.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1071\" height=\"817\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2024\/02\/2025-10-14-13_38_22-google-authenticato.png\" alt=\"\" class=\"wp-image-369\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2024\/02\/2025-10-14-13_38_22-google-authenticato.png 1071w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2024\/02\/2025-10-14-13_38_22-google-authenticato-300x229.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2024\/02\/2025-10-14-13_38_22-google-authenticato-1024x781.png 1024w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2024\/02\/2025-10-14-13_38_22-google-authenticato-768x586.png 768w\" sizes=\"auto, (max-width: 1071px) 100vw, 1071px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The main purpose of the app is to <strong>generate a six-digit code<\/strong> that must be entered in the login window of the protected system.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Configuring Ubuntu System Files<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You need to modify two SSH system files: <strong>sshd<\/strong> and <strong>sshd_config<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the terminal, enter:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/pam.d\/sshd<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"480\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image002.jpg\" alt=\"\" class=\"wp-image-360\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image002.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image002-300x191.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the opened file, add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">auth required pam_google_authenticator.so nullok<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then save your changes and close the editor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, open the second file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/ssh\/sshd_config<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this file, enable multi-factor authentication support by setting the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ChallengeResponseAuthentication yes<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"457\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003.jpg\" alt=\"\" class=\"wp-image-361\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003-300x182.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After saving the changes, return to the command line.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. Installing the PAM Module<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To connect Google Authenticator in Ubuntu, enter the following command in the terminal:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install libpam-google-authenticator<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"218\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image004.jpg\" alt=\"\" class=\"wp-image-362\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image004.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image004-300x87.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, you need to <strong>initialize Google Authenticator<\/strong> by answering questions about configuration options \u2014 speed, algorithm type, time intervals, etc.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ google-authenticator<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"40\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005.jpg\" alt=\"\" class=\"wp-image-363\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005-300x16.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"35\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image006.jpg\" alt=\"\" class=\"wp-image-364\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image006.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image006-300x14.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"268\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007.jpg\" alt=\"\" class=\"wp-image-365\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007-300x107.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. Linking the User Account<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To synchronize the Google Authenticator app on your mobile device with the PAM module on your workstation, you need to <strong>link your Ubuntu user account<\/strong>. This can be done by <strong>scanning the QR code<\/strong> that appears in the terminal after the program initialization.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"583\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image008.jpg\" alt=\"\" class=\"wp-image-366\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image008.jpg 752w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image008-300x233.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Several important codes will also be displayed \u2014 make sure to save them:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Secret key<\/strong><\/li>\n<li><strong>Six-digit verification code<\/strong><\/li>\n<li><strong>Five backup scratch codes<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The secret key can be used to connect without a QR code (for example, if the phone\u2019s camera is not working).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>verification code<\/strong> is a one-time code generated by the Google Authenticator app every <strong>30 seconds<\/strong>.<br>The user must enter it into the login window before the code expires. If the codes match, authorization is successful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Scratch codes<\/strong> are a backup way to restore access to the system in case other data is lost. More details about their use can be found in the Google Authenticator documentation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After scanning the QR code, the system gains an <strong>additional layer of protection<\/strong> based on two tokens. If multiple users are registered on the workstation, two-factor authentication must be configured <strong>separately for each user account<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Thus, two-factor authentication provides a much higher level of security by combining a <strong>password<\/strong> with a <strong>one-time confirmation code<\/strong>, making unauthorized access impossible even if the password is compromised.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.<\/p>\n","protected":false},"author":2,"featured_media":367,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[32,28],"tags":[],"class_list":["post-389","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-safety","category-software-configuration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine<\/title>\n<meta name=\"description\" content=\"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/\" \/>\n<meta property=\"og:locale\" content=\"uk_UA\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine\" \/>\n<meta property=\"og:description\" content=\"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433 Hosting in Ukraine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hostinginua\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-14T19:19:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-14T18:23:31+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2304\" \/>\n\t<meta property=\"og:image:height\" content=\"1536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tetiana Volkivska\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HostingInUA\" \/>\n<meta name=\"twitter:site\" content=\"@HostingInUA\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tetiana Volkivska\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u0445\u0432\u0438\u043b\u0438\u043d\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/\"},\"author\":{\"name\":\"Tetiana Volkivska\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/person\\\/7c7764e13cddfc79e79adefcf854a9d2\"},\"headline\":\"Two-factor user authentication \u2013 how it works\",\"datePublished\":\"2024-02-14T19:19:00+00:00\",\"dateModified\":\"2025-10-14T18:23:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/\"},\"wordCount\":879,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg\",\"articleSection\":[\"Safety\",\"Software configuration\"],\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/\",\"name\":\"Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg\",\"datePublished\":\"2024-02-14T19:19:00+00:00\",\"dateModified\":\"2025-10-14T18:23:31+00:00\",\"description\":\"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#breadcrumb\"},\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg\",\"width\":2304,\"height\":1536},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/two-factor-user-authentication-how-it-works\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0411\u043b\u043e\u0433\",\"item\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software configuration\",\"item\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/category\\\/software-configuration\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Two-factor user authentication \u2013 how it works\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\",\"name\":\"Blog Hosting in Ukraine\",\"description\":\"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433, \u0434\u043e\u043c\u0435\u043d\u0438 \u0442\u0430 \u0441\u0430\u0439\u0442\u0438\",\"publisher\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"uk\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\",\"name\":\"Blog Hosting in Ukraine\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/black_logo.png\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/black_logo.png\",\"width\":136,\"height\":30,\"caption\":\"Blog Hosting in Ukraine\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hostinginua\",\"https:\\\/\\\/x.com\\\/HostingInUA\",\"https:\\\/\\\/www.instagram.com\\\/hosting.in.ua\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/hostinginukraine\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/person\\\/7c7764e13cddfc79e79adefcf854a9d2\",\"name\":\"Tetiana Volkivska\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"caption\":\"Tetiana Volkivska\"},\"sameAs\":[\"http:\\\/\\\/hosting.in.ua\"],\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/author\\\/tasha\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine","description":"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/","og_locale":"uk_UA","og_type":"article","og_title":"Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine","og_description":"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.","og_url":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/","og_site_name":"\u0411\u043b\u043e\u0433 Hosting in Ukraine","article_publisher":"https:\/\/www.facebook.com\/hostinginua","article_published_time":"2024-02-14T19:19:00+00:00","article_modified_time":"2025-10-14T18:23:31+00:00","og_image":[{"width":2304,"height":1536,"url":"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg","type":"image\/jpeg"}],"author":"Tetiana Volkivska","twitter_card":"summary_large_image","twitter_creator":"@HostingInUA","twitter_site":"@HostingInUA","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e":"Tetiana Volkivska","\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f":"7 \u0445\u0432\u0438\u043b\u0438\u043d"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#article","isPartOf":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/"},"author":{"name":"Tetiana Volkivska","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/person\/7c7764e13cddfc79e79adefcf854a9d2"},"headline":"Two-factor user authentication \u2013 how it works","datePublished":"2024-02-14T19:19:00+00:00","dateModified":"2025-10-14T18:23:31+00:00","mainEntityOfPage":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/"},"wordCount":879,"commentCount":0,"publisher":{"@id":"https:\/\/hosting.in.ua\/blog\/#organization"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg","articleSection":["Safety","Software configuration"],"inLanguage":"uk","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/","url":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/","name":"Two-factor user authentication \u2013 how it works - \u0411\u043b\u043e\u0433 Hosting in Ukraine","isPartOf":{"@id":"https:\/\/hosting.in.ua\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#primaryimage"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg","datePublished":"2024-02-14T19:19:00+00:00","dateModified":"2025-10-14T18:23:31+00:00","description":"Principles of organizing two-factor user authentication to protect a workstation running Ubuntu OS with Google Authenticator.","breadcrumb":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#breadcrumb"},"inLanguage":"uk","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/"]}]},{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#primaryimage","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/firefly_abstract-visualization-of-secure-digital-access-\u2014-glowing-lock-binary-code-verifica-8386765.jpg","width":2304,"height":1536},{"@type":"BreadcrumbList","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/two-factor-user-authentication-how-it-works\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0411\u043b\u043e\u0433","item":"https:\/\/hosting.in.ua\/blog\/"},{"@type":"ListItem","position":2,"name":"Software configuration","item":"https:\/\/hosting.in.ua\/blog\/en\/category\/software-configuration\/"},{"@type":"ListItem","position":3,"name":"Two-factor user authentication \u2013 how it works"}]},{"@type":"WebSite","@id":"https:\/\/hosting.in.ua\/blog\/#website","url":"https:\/\/hosting.in.ua\/blog\/","name":"Blog Hosting in Ukraine","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433, \u0434\u043e\u043c\u0435\u043d\u0438 \u0442\u0430 \u0441\u0430\u0439\u0442\u0438","publisher":{"@id":"https:\/\/hosting.in.ua\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hosting.in.ua\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"uk"},{"@type":"Organization","@id":"https:\/\/hosting.in.ua\/blog\/#organization","name":"Blog Hosting in Ukraine","url":"https:\/\/hosting.in.ua\/blog\/","logo":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/black_logo.png","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/black_logo.png","width":136,"height":30,"caption":"Blog Hosting in Ukraine"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hostinginua","https:\/\/x.com\/HostingInUA","https:\/\/www.instagram.com\/hosting.in.ua\/","https:\/\/www.linkedin.com\/company\/hostinginukraine\/"]},{"@type":"Person","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/person\/7c7764e13cddfc79e79adefcf854a9d2","name":"Tetiana Volkivska","image":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","caption":"Tetiana Volkivska"},"sameAs":["http:\/\/hosting.in.ua"],"url":"https:\/\/hosting.in.ua\/blog\/author\/tasha\/"}]}},"_links":{"self":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/comments?post=389"}],"version-history":[{"count":1,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":390,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/389\/revisions\/390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/media\/367"}],"wp:attachment":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/media?parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/categories?post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/tags?post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}