{"id":258,"date":"2024-07-02T08:37:30","date_gmt":"2024-07-02T06:37:30","guid":{"rendered":"https:\/\/blog.nickywin.com\/?p=258"},"modified":"2024-07-02T13:35:00","modified_gmt":"2024-07-02T11:35:00","slug":"enable-root-login-over-ssh","status":"publish","type":"post","link":"https:\/\/blog.nickywin.com\/enable-root-login-over-ssh\/","title":{"rendered":"Enable root login over SSH"},"content":{"rendered":"<figure class=\"wp-block-post-featured-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.nickywin.com\/wp-content\/uploads\/2023\/11\/ubuntu.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"270\" data-original=\"https:\/\/blog.nickywin.com\/wp-content\/uploads\/2023\/11\/ubuntu.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-post-thumbnail size-post-thumbnail no-lazy wp-post-image\" alt=\"\" style=\"object-fit:cover;\"  sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/div><\/figure>\n\n\n<p>Login to your server as root.<br>As the root user, edit the sshd_config file found in \/etc\/ssh\/sshd_config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/ssh\/sshd_config\n<\/code><\/pre>\n\n\n\n<p>Add the following line to the file, you can add it anywhere but it\u2019s good practice to find the block about authentication and add it there.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PermitRootLogin yes<\/code><\/pre>\n\n\n\n<p>Save and exit the file.<br>Restart the SSH server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart sshd\nservice sshd restart\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Login to your server as root.As the root user, edit the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":224,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-my-code-diary","category-linux-tinkering"],"_links":{"self":[{"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":4,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/posts\/258\/revisions\/263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/media\/224"}],"wp:attachment":[{"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nickywin.com\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}