{"id":3513,"date":"2010-02-27T18:30:51","date_gmt":"2010-02-27T23:30:51","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=3513"},"modified":"2025-03-21T17:02:13","modified_gmt":"2025-03-21T21:02:13","slug":"sshd-has-failed-please-contact-the-sysadmin","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/sshd-has-failed-please-contact-the-sysadmin\/","title":{"rendered":"cPanel sshd has failed, please contact the sysadmin"},"content":{"rendered":"<h2>How to Restart SSH on a cPanel Server with a Non-Default Port<\/h2>\n<p>If you\u2019ve changed the default SSH port (Port 22) on a cPanel-powered server, you may encounter issues when trying to restart the SSH service (<code>sshd<\/code>) from WHM. This is because WHM expects SSH to be running on the default port. To resolve this, you\u2019ll need to manually restart <code>sshd<\/code> via SSH or temporarily reset the port back to 22.<\/p>\n<h3>Why Restarting SSH from WHM Fails<\/h3>\n<p>When you change the default SSH port, WHM can no longer communicate with the SSH service on port 22. As a result, attempting to restart <code>sshd<\/code> from WHM will fail. To restart the service, you\u2019ll need to connect to the server via SSH and issue the restart command manually.<\/p>\n<h3>Steps to Restart SSH Manually<\/h3>\n<ol>\n<li><strong>Connect to the Server via SSH<\/strong>:<br \/>\n    Use your SSH client to connect to the server using the new SSH port. For example:<\/p>\n<pre><code>ssh username@server_ip -p NEW_PORT<\/code><\/pre>\n<p>    Replace <code>NEW_PORT<\/code> with the port number you\u2019ve configured for SSH.\n  <\/li>\n<li><strong>Restart the SSH Service<\/strong>:<br \/>\n    Once connected, run the following command to restart <code>sshd<\/code>:<\/p>\n<pre><code>\/sbin\/service sshd restart<\/code><\/pre>\n<p>    This command will restart the SSH service, applying any configuration changes you\u2019ve made.\n  <\/li>\n<\/ol>\n<h3>Temporarily Reset SSH Port to 22<\/h3>\n<p>If you\u2019re unable to connect to the server using the new SSH port, you can temporarily reset the port back to 22 using the following steps:<\/p>\n<ol>\n<li><strong>Access the AutoFixer Tool<\/strong>:<br \/>\n    Open your browser and enter the following URL in the address bar:<\/p>\n<pre><code>SERVER_MAIN_IP:2087\/scripts2\/doautofixer?autofix=safesshrestart<\/code><\/pre>\n<p>    Replace <code>SERVER_MAIN_IP<\/code> with your server\u2019s main IP address.\n  <\/li>\n<li><strong>Restart SSH Manually<\/strong>:<br \/>\n    After resetting the port, connect to the server via SSH on port 22 and restart the SSH service using the command:<\/p>\n<pre><code>\/sbin\/service sshd restart<\/code><\/pre>\n<\/li>\n<\/ol>\n<h3>Important Notes<\/h3>\n<ul>\n<li><strong>Security Considerations<\/strong>: Changing the default SSH port can improve security by reducing the number of brute-force attacks. However, ensure you update your firewall rules to allow connections on the new port.<\/li>\n<li><strong>Permanent Changes<\/strong>: If you want to permanently change the SSH port, update the <code>Port<\/code> directive in the SSH configuration file (<code>\/etc\/ssh\/sshd_config<\/code>) and restart the SSH service.<\/li>\n<li><strong>Backup Configuration<\/strong>: Always back up your SSH configuration file before making changes to avoid losing access to your server.<\/li>\n<\/ul>\n<h3>Final Thoughts<\/h3>\n<p>Changing the default SSH port on a cPanel server can enhance security, but it requires additional steps to manage the SSH service. By following the instructions above, you can restart <code>sshd<\/code> manually or temporarily reset the port to 22 if needed. Always ensure your server remains accessible and secure when making such changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Restart SSH on a cPanel Server with a Non-Default Port If you\u2019ve changed the default SSH port (Port 22) on a cPanel-powered server, you may encounter issues when trying to restart the SSH service (sshd) from WHM. This is because WHM expects SSH to be running on the default port. To resolve this, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4853,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3513","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3513"}],"version-history":[{"count":2,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3513\/revisions"}],"predecessor-version":[{"id":5190,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3513\/revisions\/5190"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4853"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}