{"id":3454,"date":"2021-10-30T09:27:51","date_gmt":"2021-10-30T09:27:51","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=3454"},"modified":"2021-10-30T09:27:51","modified_gmt":"2021-10-30T09:27:51","slug":"how-to-enable-root-login-via-ssh-in-ubuntu","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-enable-root-login-via-ssh-in-ubuntu\/","title":{"rendered":"How to Enable Root Login via SSH in Ubuntu"},"content":{"rendered":"<p>SSH on Ubuntu is by default organized in an exceedingly approach that disables the root users log in. Originally this is often enabled as a security measure which suggests that you simply cannot directly log in as the root user over SSH. However, you&#8217;ll simply use the Root SSH login via Sudo command. But, in some conditions, it&#8217;s a lot of convenient to directly logged in as root.<\/p>\n<h2>Following are the steps to enable Root login over SSH<\/h2>\n<p>1) Login to your<strong> server as root<\/strong>.<\/p>\n<p>2) Now you are a root user. So, edit the sshd_config file located in\u00a0<strong><em>\/etc\/ssh\/sshd_config<\/em><\/strong><\/p>\n<blockquote><p>vim \/etc\/ssh\/sshd_config<\/p><\/blockquote>\n<p>3) Now, add the subsequent command to the file. Even though you&#8217;ll add it anyplace however we tend to advise you to follow the most effective observe by adding the command within the block for authentication.<\/p>\n<blockquote><p>PermitRootLogin yes<\/p><\/blockquote>\n<p>4) Save this file and exit.<\/p>\n<p>5) Using the following command Restart your SSH server :<\/p>\n<blockquote><p>systemctl restart sshd<\/p><\/blockquote>\n<p>Or<\/p>\n<blockquote><p>service sshd restart<\/p><\/blockquote>\n<p>That\u2019s it.<\/p>\n<p>With this, the new line gets added and also the SSH server gets restart, this permits you currently to connect via the root user.<\/p>\n<p>In this instance, you may be ready to log in because the root user by using either the password or an SSH key.<\/p>\n<p>If you use SSH keys, you may be able to set the PermitRootLogin value to \u2018without-password\u2019 instead of yes. To complete this, simply modify step 2 with the subsequent command :<\/p>\n<blockquote><p>PermitRootLogin without-password<\/p><\/blockquote>\n<p>This method works on all versions of the Linux server on which the sshd service is installed. Just in case you&#8217;re using a cPanel server, still you&#8217;ll simply control this setting from the WHM interface. In such cases, we tend to suggest you to modify this setting from your control panel interface.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSH on Ubuntu is by default organized in an exceedingly approach that disables the root users log in. Originally this is often enabled as a security measure which suggests that you simply cannot directly log in as the root user over SSH. However, you&#8217;ll simply use the Root SSH login via Sudo command. But, in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-3454","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=3454"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3454\/revisions"}],"predecessor-version":[{"id":3455,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3454\/revisions\/3455"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=3454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=3454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=3454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}