{"id":2304,"date":"2020-05-29T11:08:42","date_gmt":"2020-05-29T11:08:42","guid":{"rendered":"https:\/\/www.sygitech.com\/?p=2304"},"modified":"2020-05-29T11:08:42","modified_gmt":"2020-05-29T11:08:42","slug":"securing-a-linux-server-with-two-factor-authentication","status":"publish","type":"post","link":"https:\/\/www.sygitech.com\/blog\/securing-a-linux-server-with-two-factor-authentication\/","title":{"rendered":"Securing a Linux server with two-factor authentication"},"content":{"rendered":"\n<p>If you really want to secure your Linux server, then the two-factor authentication must be considered as a must-use. If you want to lock your Linux servers and desktops, then you owe yourself a two-factor authentication. This is because by adding the authentication, it becomes more intricate for the malicious users to gain access to your machines. With Linux, it\u2019s very possible to set up the machine so that you can\u2019t log into the desktop or console or by any way of the secure shell without the two-factor authentication code that\u2019s associated with the machine.<\/p>\n\n\n\n<p>Before you begin<\/p>\n\n\n\n<p>Before you begin with the process, there\u2019s one thing you must know about adding the two-factor authentication. It is that once you\u2019ve set it up without any third party generated codes, you won\u2019t be able to gain access to your machine. Every time you want to log in, you will have to do it with the smartphone o the emergency codes. These can be generated easily with the installation of the necessary tools.&nbsp;<\/p>\n\n\n\n<p>What you&#8217;ll need<\/p>\n\n\n\n<p>The first thing you\u2019ll need is a Linux desktop or a server. Make sure that it\u2019s fully updated and the data is backed up. Along with this, you\u2019ll require a third-party application to generate the two-factor codes. You can use Authy for the task or the Google Authenticator app.&nbsp;<\/p>\n\n\n\n<p>Installation<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The first step is to log into the Linux server and follow the steps given below-<\/li><li>Open up the terminal window&nbsp;<\/li><li>Now, Issue the command&nbsp; for -google-authentication<\/li><li>Type the sudo password and hit enter<\/li><li>If it\u2019s prompted, type y and hit enter<\/li><li>Allow the installation to complete&nbsp;<\/li><li>Configure the machine with two-factor authentication&nbsp;<\/li><\/ul>\n\n\n\n<p>This authentication has been around for a very long time. It needs two methods of authentication which can be used to verify the user\u2019s identity. This basically consists of the regular username and password with a verification code that\u2019s sent to you via the mobile device or the text message.&nbsp;<\/p>\n\n\n\n<p><strong>Considerations and Prerequisites&nbsp;<\/strong><\/p>\n\n\n\n<p>Setting it up means that all the users of the system will need the verification code from Google authentication user when &#8211;&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Logging in to the system&nbsp;<\/li><li>Running sudo commands&nbsp;<\/li><\/ul>\n\n\n\n<p>The added up layer of security is also very vital. It\u2019s especially needed on the machines that house sensitive data.&nbsp;<\/p>\n\n\n\n<p><strong>Here\u2019s how you can do it<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Install Google Authenticator<\/strong> &#8211; For mobile devices, install the Google Authenticator from the Google Playstore. Accept all the requirements and wait for the installation to finish. Fire up the terminal session on the server or desktop.&nbsp;<\/li><li><strong>Configuration <\/strong>&#8211; You\u2019ll have to edit the file to add up the two-step authentication factor to the precious Linux box.&nbsp;<\/li><li><strong>Set up the individual users <\/strong>&#8211; In this step, you need to finally link the Google Authentication. This is the step that requires to be run for all the users that log in your system. Take care of the QR codes, a verification code, five emergency scratch codes, a new secret key, and others. The QR code along with the secret key serves the same function. The verification code is a one-time code that can be used immediately when required. Then there are scratch codes that are used as the one-time codes which can be used in the event that don\u2019t have the mobile device handy. The users can easily print these out and get them stored under the thermonuclear lock or key or just ignore them easily. This will ultimately depend on how prone you\u2019re to forgetting or losing the mobile devices.&nbsp;<\/li><li><strong>Set up the mobile application<\/strong> &#8211; Before you continue to any of the other users, you need to complete the one that you\u2019re currently logged in with. If this is your first time launching the Google Authenticator on the mobile device, then click on Begin. You can do it from the main window click plus icon in the bottom corner. If the resolution on the terminal window is not good enough for you to see the QR code, then select Scan a barcode or enter the provided key. If you opt for the key option, you will have to enter the account name to help yourself remember which account it definitely relates to. This will add up a layer of protection to your mobile device.<\/li><li><strong>Final steps and testing<\/strong> &#8211; Open the Google Authenticator on our mobile and type the six-digit authentication code on the terminal window. Enter up the sudo password and hit enter. You will be logged in. You can simply follow the steps that are exactly the same as are for the first users. After you\u2019ve answered all the questions, then you can add up another account as you wish. Once all the users have been set up, you\u2019ll feel secure with all your data.&nbsp;<\/li><\/ul>\n\n\n\n<p>That\u2019s it! Your Linux machine is more secure than it was previously.<\/p>\n\n\n\n<p>Make your Linux server secure with a few easy steps.<\/p>\n\n\n\n<p>Till then, stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you really want to secure your Linux server, then the two-factor authentication must be considered as a must-use. If you want to lock your Linux servers and desktops, then you owe yourself a two-factor authentication. This is because by adding the authentication, it becomes more intricate for the malicious users to gain access to [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[42],"tags":[],"class_list":["post-2304","post","type-post","status-publish","format-standard","hentry","category-linux-server"],"featured_image_src":"","author_info":{"display_name":"priya","author_link":"https:\/\/www.sygitech.com\/blog\/author\/priya\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Securing a Linux server with two-factor authentication - Sygitech Blog<\/title>\n<meta name=\"description\" content=\"Make your Linux server secure with a few easy steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Securing a Linux server with two-factor authentication - Sygitech Blog\" \/>\n<meta property=\"og:description\" content=\"Make your Linux server secure with a few easy steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\" \/>\n<meta property=\"og:site_name\" content=\"Sygitech Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-29T11:08:42+00:00\" \/>\n<meta name=\"author\" content=\"priya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"priya\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\"},\"author\":{\"name\":\"priya\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/50a2c013cf657f2286aaa0cd2c7ad0ea\"},\"headline\":\"Securing a Linux server with two-factor authentication\",\"datePublished\":\"2020-05-29T11:08:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\"},\"wordCount\":863,\"publisher\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/#organization\"},\"articleSection\":[\"Linux Server\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\",\"url\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\",\"name\":\"Securing a Linux server with two-factor authentication - Sygitech Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/#website\"},\"datePublished\":\"2020-05-29T11:08:42+00:00\",\"description\":\"Make your Linux server secure with a few easy steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sygitech.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Securing a Linux server with two-factor authentication\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#website\",\"url\":\"https:\/\/www.sygitech.com\/blog\/\",\"name\":\"Sygitech Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sygitech.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#organization\",\"name\":\"Sygitech Blog\",\"url\":\"https:\/\/www.sygitech.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":181,\"height\":24,\"caption\":\"Sygitech Blog\"},\"image\":{\"@id\":\"https:\/\/www.sygitech.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/50a2c013cf657f2286aaa0cd2c7ad0ea\",\"name\":\"priya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"priya\"},\"url\":\"https:\/\/www.sygitech.com\/blog\/author\/priya\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Securing a Linux server with two-factor authentication - Sygitech Blog","description":"Make your Linux server secure with a few easy steps.","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:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html","og_locale":"en_US","og_type":"article","og_title":"Securing a Linux server with two-factor authentication - Sygitech Blog","og_description":"Make your Linux server secure with a few easy steps.","og_url":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html","og_site_name":"Sygitech Blog","article_published_time":"2020-05-29T11:08:42+00:00","author":"priya","twitter_card":"summary_large_image","twitter_misc":{"Written by":"priya","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#article","isPartOf":{"@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html"},"author":{"name":"priya","@id":"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/50a2c013cf657f2286aaa0cd2c7ad0ea"},"headline":"Securing a Linux server with two-factor authentication","datePublished":"2020-05-29T11:08:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html"},"wordCount":863,"publisher":{"@id":"https:\/\/www.sygitech.com\/blog\/#organization"},"articleSection":["Linux Server"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html","url":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html","name":"Securing a Linux server with two-factor authentication - Sygitech Blog","isPartOf":{"@id":"https:\/\/www.sygitech.com\/blog\/#website"},"datePublished":"2020-05-29T11:08:42+00:00","description":"Make your Linux server secure with a few easy steps.","breadcrumb":{"@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sygitech.com\/blog\/linux-server\/securing-a-linux-server-with-two-factor-authentication.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sygitech.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Securing a Linux server with two-factor authentication"}]},{"@type":"WebSite","@id":"https:\/\/www.sygitech.com\/blog\/#website","url":"https:\/\/www.sygitech.com\/blog\/","name":"Sygitech Blog","description":"","publisher":{"@id":"https:\/\/www.sygitech.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sygitech.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.sygitech.com\/blog\/#organization","name":"Sygitech Blog","url":"https:\/\/www.sygitech.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sygitech.com\/blog\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":181,"height":24,"caption":"Sygitech Blog"},"image":{"@id":"https:\/\/www.sygitech.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/50a2c013cf657f2286aaa0cd2c7ad0ea","name":"priya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sygitech.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"priya"},"url":"https:\/\/www.sygitech.com\/blog\/author\/priya\/"}]}},"featured_image_src_square":false,"rbea_author_info":{"display_name":"priya","author_link":"https:\/\/www.sygitech.com\/blog\/author\/priya\/"},"rbea_excerpt_info":"If you really want to secure your Linux server, then the two-factor authentication must be considered as a must-use. If you want to lock your Linux servers and desktops, then you owe yourself a two-factor authentication. This is because by adding the authentication, it becomes more intricate for the malicious users to gain access to [&hellip;]","category_list":"<a href=\"https:\/\/www.sygitech.com\/blog\/category\/linux-server\/\" rel=\"category tag\">Linux Server<\/a>","comments_num":"0 comments","rttpg_featured_image_url":null,"rttpg_author":{"display_name":"priya","author_link":"https:\/\/www.sygitech.com\/blog\/author\/priya\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/www.sygitech.com\/blog\/category\/linux-server\/\" rel=\"category tag\">Linux Server<\/a>","rttpg_excerpt":"If you really want to secure your Linux server, then the two-factor authentication must be considered as a must-use. If you want to lock your Linux servers and desktops, then you owe yourself a two-factor authentication. This is because by adding the authentication, it becomes more intricate for the malicious users to gain access to&hellip;","_links":{"self":[{"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/posts\/2304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/comments?post=2304"}],"version-history":[{"count":0,"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/posts\/2304\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/media?parent=2304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/categories?post=2304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sygitech.com\/blog\/wp-json\/wp\/v2\/tags?post=2304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}