{"id":647,"date":"2025-12-08T06:53:14","date_gmt":"2025-12-08T04:53:14","guid":{"rendered":"https:\/\/hostup.se\/en\/support\/?p=647"},"modified":"2025-12-08T06:54:14","modified_gmt":"2025-12-08T04:54:14","slug":"fjarrkommandon","status":"publish","type":"post","link":"https:\/\/hostup.se\/en\/support\/fjarrkommandon\/","title":{"rendered":"Troubleshoot and Rescue Your VPS with Remote Commands (When SSH Isn&#8217;t Working)"},"content":{"rendered":"\n<p>At HostUp, we believe you should have complete control over your server\u2014even when things go wrong. That\u2019s why we\u2019ve introduced <strong>Remote Commands<\/strong> in our customer portal. It\u2019s a powerful tool that lets you run commands directly on your server through the QEMU Guest Agent\u2014no SSH login required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_can_I_use_this_for\"><\/span>What can I use this for?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The tool is perfect for troubleshooting and rescue operations. Because the commands run directly through the hypervisor (the virtualization layer), you\u2019re not dependent on the network\u2014or on SSH running properly on the server. For example, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Restore SSH configurations that have gone wrong.<\/li>\n\n\n\n<li>Stop a firewall (UFW\/IPTables) that is blocking your access.<\/li>\n\n\n\n<li>Check disk space or memory usage if the server feels sluggish.<\/li>\n\n\n\n<li>Change the default shell if login has stopped working.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Use_Remote_Commands\"><\/span>How to Use Remote Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Start by logging in to your customer zone at Log in to <a href=\"https:\/\/cloud.hostup.se\/login\/en\">cloud.hostup.se<\/a> if you are not already logged in and select the VPS you want to access:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/hostup.se\/images\/vps-dashboard-2x-en.webp\"><img decoding=\"async\" src=\"https:\/\/hostup.se\/images\/vps-dashboard-2x-en.webp\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click the <strong>Settings<\/strong> tab and select <strong>Remote Commands<\/strong> from the menu.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"504\" src=\"https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-1024x504.png\" alt=\"\" class=\"wp-image-648\" srcset=\"https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-1024x504.png 1024w, https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-300x148.png 300w, https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-768x378.png 768w, https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-1536x757.png 1536w, https:\/\/hostup.se\/en\/support\/wp-content\/uploads\/2025\/12\/remote-commands-2048x1009.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make sure the status in the top right shows <strong>Agent Online<\/strong> (green dot).<\/li>\n\n\n\n<li>Type your command in the box, or click one of our &#8220;Quick Commands,&#8221; and press <strong>Run<\/strong>.<\/li>\n<\/ul>\n\n\n\n<ul start=\"1\" class=\"wp-block-list\"><\/ul>\n\n\n\n<p><em>Warning: Every command here runs as root with full privileges. Be careful what you type!<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Real-world_example_%E2%80%9CAccess_Denied%E2%80%9D_after_switching_shells\"><\/span>Real-world example: &#8220;Access Denied&#8221; after switching shells<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>A common mistake (one we\u2019ve seen even the best make!) is changing your root shell to zsh or fish without actually installing it first.<\/p>\n\n\n\n<p><strong>The result?<\/strong> When you try to SSH in, you get an \u201cAccess Denied\u201d error\u2014or the session closes right away\u2014because the server can\u2019t find the program it\u2019s supposed to start at login. You can easily see the error in the logs (journalctl -f), but if you can\u2019t get into the server it becomes very hard to figure out what\u2019s wrong\u2014especially after you\u2019ve already reset the password and still can\u2019t access it.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Solution_Remote_Commands\"><\/span>Solution: Remote Commands<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Previously, you had to pull up the console and hope you could log in, or boot into a \u201cRescue Image\u201d to fix the issue. Now you can handle it yourself in just 30 seconds:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Remote Commands<\/strong> under Settings.<\/li>\n\n\n\n<li>Click the quick command <strong>Fix shell symlink<\/strong> (or enter it manually: <code>chsh -s \/bin\/bash root<\/code>).<\/li>\n\n\n\n<li>Press <strong>Run<\/strong>.<\/li>\n\n\n\n<li>All set! You can log in via SSH again.<\/li>\n<\/ol>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\"><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_commands_you_might_need\"><\/span>Common commands you might need<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Here are some handy commands to have on hand when your server is acting up:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Check if the disk is full:<\/strong> <code>df -h<\/code><\/li>\n\n\n\n<li><strong>Restart the SSH service:<\/strong> <code>systemctl restart ssh<\/code><\/li>\n\n\n\n<li><strong>See the latest logs:<\/strong> <code>journalctl -n 50 --no-pager<\/code><\/li>\n\n\n\n<li><strong>Check who&#8217;s eating memory:<\/strong> <code>ps aux --sort=-%mem | head<\/code><\/li>\n\n\n\n<li><strong>Disable the firewall:<\/strong> <code>ufw disable<\/code> or <code>iptables -F<\/code><\/li>\n<\/ul>\n\n\n\n<p>Still having trouble even after using Remote Commands? Of course, we&#8217;re here for you. Open a support ticket and we&#8217;ll help you out!<\/p>\n\r\n\t\t\t<div id=\"daexthefu-container\"\r\n\t\t\t\tclass=\"daexthefu-container daexthefu-layout-side-by-side daexthefu-alignment-left\"\r\n\t\t\t\tdata-post-id=\"647\">\r\n\r\n\t\t\t\t<div class=\"daexthefu-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefu-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefu-title\">Was this article helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefu-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefu-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefu-yes daexthefu-button daexthefu-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.happy-face-cls-1{fill:#c9c9c9;}.happy-face-cls-2{fill:#e1e1e1;}.happy-face-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"happy_face\">\r\n                        <circle class=\"happy-face-cls-1 daexthefu-icon-primary-color\" cx=\"24\" cy=\"24\" r=\"17\" \/>\r\n                        <path class=\"happy-face-cls-2 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <circle class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" cx=\"18\" cy=\"22\" r=\"2\" \/>\r\n                        <circle class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" cx=\"30\" cy=\"22\" r=\"2\" \/>\r\n                        <path class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" d=\"m16.79,29c-1.19,0-1.89,1.31-1.25,2.32,1.77,2.81,4.9,4.68,8.47,4.68s6.7-1.87,8.47-4.68c.63-1.01-.06-2.32-1.25-2.32-3.67,0-10.76,0-14.43,0Z\" \/>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefu-no daexthefu-button daexthefu-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>\r\n                            .sad-face-cls-1{fill:#c9c9c9;}.sad-face-cls-2{fill:#676767;}.sad-face-cls-3{fill:#e1e1e1;}.sad-face-cls-4{fill:#676767;}\r\n                        <\/style>\r\n                    <\/defs>\r\n                    <g id=\"sad_face\">\r\n                        <circle class=\"sad-face-cls-1 daexthefu-icon-primary-color\" cx=\"24\" cy=\"24\" r=\"17\" \/>\r\n                        <path class=\"sad-face-cls-3 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <circle class=\"sad-face-cls-4 daexthefu-icon-secondary-color\" cx=\"18\" cy=\"22\" r=\"2\" \/>\r\n                        <circle class=\"sad-face-cls-4 daexthefu-icon-secondary-color\" cx=\"30\" cy=\"22\" r=\"2\" \/>\r\n                        <path class=\"sad-face-cls-2 daexthefu-icon-secondary-color\" d=\"M16.9,34.5c-0.4,0-0.8-0.1-1.1-0.4c-0.6-0.6-0.6-1.5,0-2.1c2.2-2.2,5.1-3.4,8.1-3.4c3.1,0,6,1.2,8.1,3.4\r\n                        c0.6,0.6,0.6,1.5,0,2.1s-1.5,0.6-2.1,0c-1.6-1.6-3.7-2.5-6-2.5s-4.4,0.9-6,2.5C17.7,34.4,17.3,34.5,16.9,34.5z\" \/>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-comment\">\r\n\t\t\t\t\t<div class=\"daexthefu-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefu-comment-label\" class=\"daexthefu-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefu-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefu-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefu-comment-textarea\" class=\"daexthefu-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Skriv ditt meddelande\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefu-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-submit daexthefu-button\">Skicka in<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-cancel daexthefu-button\">Avbryt<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-successful-submission-text\">Tack f\u00f6r din feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>Have you accidentally locked yourself out of your server? Is SSH unresponsive, or did you set the firewall a little too aggressively? Don\u2019t panic.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_helpful_status":1,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-647","post","type-post","status-publish","format-standard","hentry","category-vps"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/comments?post=647"}],"version-history":[{"count":4,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/647\/revisions"}],"predecessor-version":[{"id":652,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/647\/revisions\/652"}],"wp:attachment":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/media?parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/categories?post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/tags?post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}