{"id":1147,"date":"2021-06-29T06:05:04","date_gmt":"2021-06-29T06:05:04","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=1147"},"modified":"2021-10-04T13:26:03","modified_gmt":"2021-10-04T13:26:03","slug":"ssh-root-login-command","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/","title":{"rendered":"How can root login and password authentication for SSH be disabled?"},"content":{"rendered":"<p>The root user is enabled by default on most <a href=\"https:\/\/www.velaninfo.com\/rs\/tech-tips\/server\/\"><strong>Linux servers<\/strong><\/a>, and hackers frequently attempt to get access to it by guessing its password. As a result, it&#8217;s a good idea to turn off the root account. First, make sure you have an admin user account so you can use the sudo special privileges access command to run root-level commands later. The Enable root login SSH can then be safely disabled.<\/p>\n<p><em>$ vi \/etc\/ssh\/sshd_config<\/em><\/p>\n<p><em>PermitRootLogin no<\/em><\/p>\n<p>Also, instead of using a password, you can use a safe mechanism like Enable root login SSH public-private key authentication.<\/p>\n<p><em>$ vi \/etc\/ssh\/sshd_config<\/em><\/p>\n<p><em>PasswordAuthentication no<\/em><\/p>\n<p>At Velan, our server support engineers can harden &amp; manage your Linux server.\u00a0If you are interested in our service, please fill the <a href=\"https:\/\/www.velaninfo.com\/contact\"><strong>Quick connect form<\/strong><\/a> to get in touch with us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The root user is enabled by default on most Linux servers, and hackers frequently attempt to get access to it by guessing its password. As a result, it&#8217;s a good idea to turn off the root account. First, make sure you have an admin user account so you can use the sudo special privileges access&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-1147","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-core","Categories_tech_tip-linux","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Enable root login SSH | Password authentication for SSH be disabled<\/title>\n<meta name=\"description\" content=\"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.\" \/>\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.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can root login and password authentication for SSH be disabled?\" \/>\n<meta property=\"og:description\" content=\"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-04T13:26:03+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/ssh-root-login-command\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/ssh-root-login-command\\\/\",\"name\":\"Enable root login SSH | Password authentication for SSH be disabled\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"datePublished\":\"2021-06-29T06:05:04+00:00\",\"dateModified\":\"2021-10-04T13:26:03+00:00\",\"description\":\"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/ssh-root-login-command\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/ssh-root-login-command\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/ssh-root-login-command\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How can root login and password authentication for SSH be disabled?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Enable root login SSH | Password authentication for SSH be disabled","description":"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.","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.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/","og_locale":"en_US","og_type":"article","og_title":"How can root login and password authentication for SSH be disabled?","og_description":"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/","og_site_name":"Velan","article_modified_time":"2021-10-04T13:26:03+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/","name":"Enable root login SSH | Password authentication for SSH be disabled","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"datePublished":"2021-06-29T06:05:04+00:00","dateModified":"2021-10-04T13:26:03+00:00","description":"How do I SSH with a username and password? Enable root login over SSH be disabled. enables password authentication for one user.","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/ssh-root-login-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How can root login and password authentication for SSH be disabled?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=1147"}],"version-history":[{"count":3,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1147\/revisions"}],"predecessor-version":[{"id":1444,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1147\/revisions\/1444"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=1147"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=1147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}