{"id":7545,"date":"2023-12-12T19:42:23","date_gmt":"2023-12-12T14:12:23","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=7545"},"modified":"2023-12-12T19:42:27","modified_gmt":"2023-12-12T14:12:27","slug":"how-to-start-the-ssh-service-if-it-fails-after-rebooting-the-server","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-start-the-ssh-service-if-it-fails-after-rebooting-the-server\/","title":{"rendered":"How to start the SSH service if it fails after rebooting the server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Introduction:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re having trouble accessing your server via SSH after a reboot, there are several common issues that you can check. Use the below steps to recover SSH access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisite<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Server root login credentials.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-192437.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"750\" height=\"398\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-192437.png\" alt=\"\" class=\"wp-image-7559\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-192437.png 750w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-192437-300x159.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-192437-565x300.png 565w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Please check the SSH service status.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ systemctl status ssh.service<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Step 2:<\/strong><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-193547.png\"><img decoding=\"async\" width=\"482\" height=\"57\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-193547.png\" alt=\"\" class=\"wp-image-7557\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-193547.png 482w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/12\/Screenshot-2023-12-12-193547-300x35.png 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the sshd configuration status.<br>If it shows an error like &#8220;Missing Privilege Separation Directory: \/var\/run\/sshd&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ sudo sshd -t<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><br><strong>Step 3:<\/strong><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Please create the directory sshd<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ mkdir -p \/var\/run\/sshd<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Step 4:<\/strong><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Modify ownership to that directory<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ chown root:root \/var\/run\/sshd<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Step 5:<\/strong><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Restart the SSH service<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>systemctl restart ssh<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Step 6:<\/strong><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Recheck the configuration of the OpenSSH server.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>sudo sshd -t<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><br><\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: If you&#8217;re having trouble accessing your server via SSH after a reboot, there are several common issues that you [&hellip;]<\/p>\n","protected":false},"author":499,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[],"class_list":["post-7545","post","type-post","status-publish","format-standard","hentry","category-web-architecture","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1XH","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/499"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7545"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7545\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}