{"id":3497,"date":"2014-04-07T08:45:59","date_gmt":"2014-04-07T13:45:59","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=3497"},"modified":"2025-07-24T05:03:12","modified_gmt":"2025-07-24T10:03:12","slug":"how-to-secure-your-ssh-using-two-step-authentication-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/","title":{"rendered":"How to secure your SSH using two-step authentication on CentOS 6"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<h5 class=\"wp-block-heading\" id=\"h-status-this-os-is-no-longer-supported\">Status: This OS is no longer supported<\/h5>\n\n\n\n<p><em>This article, &#8220;How to secure your SSH using two-step authentication on CentOS 6,&#8221; covers a version of CentOS that reached end of life (EOL). The developing company no longer supports it. As such, <\/em>w<em>e no longer maintain this guide. If you are currently operating a server running CentOS 6, we highly recommend contacting <a href=\"https:\/\/www.rosehosting.com\/support\/\">RoseHosting&#8217;s fully managed support<\/a>. They can upgrade or migrate you to a supported version of AlmaLinux.<\/em><\/p>\n\n\n\n<!--more-->\n\n\n<p><img decoding=\"async\" class=\"wp-image-23710 size-full alignleft\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS.png\" alt=\"secure SSH using two-step authentication on CentOS\" width=\"353\" height=\"381\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS.png 353w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS-139x150.png 139w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS-278x300.png 278w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS-200x216.png 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/secure-SSH-using-two-step-authentication-on-CentOS-50x54.png 50w\" sizes=\"(max-width: 353px) 100vw, 353px\" \/>There are several things you can do to secure and protect your SSH. One of them is to use Google Authenticator and create a two-factor authentication on your <a title=\"CentOS VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS VPS<\/a>. Google Authenticator provides an extra layer of security by generating time-based one-time passwords (TOTP) on your smartphone, which you must enter along with your username and password to log in to the server via SSH.<\/p>\n<p>In today&#8217;s blog article, we will explain how to install Google Authenticator from source and configure SSH for two-factor authentication.<\/p>\n<h2>Installation Steps<\/h2>\n<p>First of all, update your CentOS virtual server<\/p>\n<pre>yum -y update<\/pre>\n<p>Next, install the &#8216;<em>pam-devel<\/em>&#8216; package, which allows you to set authentication policies without having to recompile programs that handle authentication.<\/p>\n<pre>yum -y install pam-devel<\/pre>\n<p>Ensure that the ntpd installed and running because the TOTP security tokens are time sensitive<\/p>\n<pre>yum -y install ntp\n\/etc\/init.d\/ntpd start\nchkconfig ntpd on<\/pre>\n<p>Download and unpack the Google Authenticator package<\/p>\n<pre>cd \/opt\/\nwget https:\/\/google-authenticator.googlecode.com\/files\/libpam-google-authenticator-1.0-source.tar.bz2\ntar -xvzf libpam-google-authenticator-1.0-source.tar.bz2\ncd libpam-google-authenticator-1.0<\/pre>\n<p>Compile and install the Google Authenticator module<\/p>\n<pre>make\nmake install<\/pre>\n<p>Now, run the Google Authenticator on your server and answer each of the questions<\/p>\n<pre>google-authenticator\n\nDo you want authentication tokens to be time-based (y\/n) y\nhttps:\/\/www.google.com\/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth:\/\/totp\/root@YOURHOSTNAME%3Fsecret%3DWYD4YCGEE5N4M3LA\nYour new secret key is: WYD4YCGEE5N4M3LA\nYour verification code is 188127\nYour emergency scratch codes are:\n  60086389\n  28918071\n  88502143\n  60873576\n  90892542\n\nDo you want me to update your \"\/root\/.google_authenticator\" file (y\/n) y\n\nDo you want to disallow multiple uses of the same authentication\ntoken? This restricts you to one login about every 30s, but it increases\nyour chances to notice or even prevent man-in-the-middle attacks (y\/n) y\n\nBy default, tokens are good for 30 seconds and in order to compensate for\npossible time-skew between the client and the server, we allow an extra\ntoken before and after the current time. If you experience problems with poor\ntime synchronization, you can increase the window from its default\nsize of 1:30min to about 4min. Do you want to do so (y\/n) y\n\nIf the computer that you are logging into isn't hardened against brute-force\nlogin attempts, you can enable rate-limiting for the authentication module.\nBy default, this limits attackers to no more than 3 login attempts every 30s.\nDo you want to enable rate-limiting (y\/n) y<\/pre>\n<p>Open the URL given after answering the first question and scan the QR code using the Google Authenticator application on your smartphone. That&#8217;s all.\u00a0The system generates a new verification code every 30 seconds.<\/p>\n<p>Now you will need to enable Google Authenticator for SSH logins. Open PAM&#8217;s configuration file<\/p>\n<pre>vi \/etc\/pam.d\/sshd<\/pre>\n<p>And add the following line at the top.<\/p>\n<pre>auth       required     pam_google_authenticator.so<\/pre>\n<div><span class=\"css-1jxf684 r-bcqeeo r-1ttztb7 r-qvutc0 r-poiln3\"><span class=\"css-1jxf684 r-bcqeeo r-1ttztb7 r-qvutc0 r-poiln3 r-1x3r274\">Access the SSH configuration file and confirm that the &#8216;<em>ChallengeResponseAuthentication<\/em>&#8216; line is set to yes.<\/span><\/span><\/div>\n<pre>ChallengeResponseAuthentication yes<\/pre>\n<p>Save the changes and restart the SSH service:<\/p>\n<pre>service sshd restart<\/pre>\n<div><span class=\"css-1jxf684 r-bcqeeo r-1ttztb7 r-qvutc0 r-poiln3\"><span class=\"css-1jxf684 r-bcqeeo r-1ttztb7 r-qvutc0 r-poiln3 r-1x3r274\">Each time you attempt to SSH into your server, the system will prompt you to enter the verification code shown in your Google Authenticator app.<\/span><\/span><\/div>\n<pre>login as: \nVerification code:\nPassword:<\/pre>\n<p>Of course, if you are one of our <a title=\"Linux VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> customers, you don\u2019t have to do any of this; ask our admins, sit back, and relax. Our admins will set this up for you immediately. For updates, you can refer to <a href=\"https:\/\/www.rosehosting.com\/blog\/secure-your-ssh-using-two-factor-authentication-on-ubuntu-16-04\/\">Secure SSH using two-factor authentication on Ubuntu 16.04<\/a>.<\/p>\n<p><strong><span style=\"color: #ff0000;\">PS.<\/span><\/strong> If you like this post, please share it with your friends or leave a reply below. Thanks.<\/p>","protected":false},"excerpt":{"rendered":"<p>Status: This OS is no longer supported This article, &#8220;How to secure your SSH using two-step authentication on CentOS 6,&#8221; &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to secure your SSH using two-step authentication on CentOS 6\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#more-3497\" aria-label=\"Read more about How to secure your SSH using two-step authentication on CentOS 6\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":3498,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1703,13],"tags":[34,431,177,359,68,432],"class_list":["post-3497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-security","category-tutorials","tag-centos","tag-google-authenticator","tag-linux-vps","tag-secure","tag-ssh","tag-two-steps-authentication","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SSH on CentOS 6: Final Tips for Security | RoseHosting<\/title>\n<meta name=\"description\" content=\"Explore how to secure SSH on CentOS 6 with two-factor authentication using Google Authenticator for enhanced security.\" \/>\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.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to secure your SSH using two-step authentication on CentOS 6\" \/>\n<meta property=\"og:description\" content=\"How to secure your SSH using two-step authentication on CentOS 6 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-07T13:45:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-24T10:03:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png\" \/>\n\t<meta property=\"og:image:width\" content=\"353\" \/>\n\t<meta property=\"og:image:height\" content=\"381\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to secure your SSH using two-step authentication on CentOS 6\",\"datePublished\":\"2014-04-07T13:45:59+00:00\",\"dateModified\":\"2025-07-24T10:03:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/\"},\"wordCount\":418,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/unnamed.png\",\"keywords\":[\"centos\",\"google authenticator\",\"linux vps\",\"secure\",\"ssh\",\"two-steps authentication\"],\"articleSection\":[\"CentOS\",\"Security\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/\",\"name\":\"SSH on CentOS 6: Final Tips for Security | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/unnamed.png\",\"datePublished\":\"2014-04-07T13:45:59+00:00\",\"dateModified\":\"2025-07-24T10:03:12+00:00\",\"description\":\"Explore how to secure SSH on CentOS 6 with two-factor authentication using Google Authenticator for enhanced security.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/unnamed.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/unnamed.png\",\"width\":353,\"height\":381},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to secure your SSH using two-step authentication on CentOS 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SSH on CentOS 6: Final Tips for Security | RoseHosting","description":"Explore how to secure SSH on CentOS 6 with two-factor authentication using Google Authenticator for enhanced security.","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.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/","og_locale":"en_US","og_type":"article","og_title":"How to secure your SSH using two-step authentication on CentOS 6","og_description":"How to secure your SSH using two-step authentication on CentOS 6 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-04-07T13:45:59+00:00","article_modified_time":"2025-07-24T10:03:12+00:00","og_image":[{"width":353,"height":381,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to secure your SSH using two-step authentication on CentOS 6","datePublished":"2014-04-07T13:45:59+00:00","dateModified":"2025-07-24T10:03:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/"},"wordCount":418,"commentCount":3,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png","keywords":["centos","google authenticator","linux vps","secure","ssh","two-steps authentication"],"articleSection":["CentOS","Security","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/","name":"SSH on CentOS 6: Final Tips for Security | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png","datePublished":"2014-04-07T13:45:59+00:00","dateModified":"2025-07-24T10:03:12+00:00","description":"Explore how to secure SSH on CentOS 6 with two-factor authentication using Google Authenticator for enhanced security.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/04\/unnamed.png","width":353,"height":381},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-ssh-using-two-step-authentication-on-centos-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to secure your SSH using two-step authentication on CentOS 6"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=3497"}],"version-history":[{"count":4,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3497\/revisions"}],"predecessor-version":[{"id":50882,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3497\/revisions\/50882"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/3498"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=3497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=3497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=3497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}