{"id":167,"date":"2025-06-03T10:12:32","date_gmt":"2025-06-03T10:12:32","guid":{"rendered":"http:\/\/123.249.119.122\/Wordpress\/?p=167"},"modified":"2025-06-22T02:14:39","modified_gmt":"2025-06-22T02:14:39","slug":"remote-logging-by-ssh","status":"publish","type":"post","link":"http:\/\/123.249.119.122\/Wordpress\/index.php\/2025\/06\/03\/remote-logging-by-ssh\/","title":{"rendered":"Remote logging by SSH"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Premise:The cloud server can logging by local method(like VNC),but remote logging is unavailable.The  cloud server can&#8217;t log in by SSH,or by remote tools like Cloudshell,Xshell.How to solve the problem?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First,log in the cloud server by correct usermane and password.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"154\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image.png\" alt=\"\" class=\"wp-image-169\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image.png 812w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-300x57.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-768x146.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is the checklist to solve the problem:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1.Input &#8216;<strong>systemctl status sshd<\/strong>&#8216; in the cloud server to check the sshd service.When the sshd is inactive,you can input &#8216;<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">systemctl start sshd<\/mark><\/strong>&#8216; to restart sshd.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"169\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-1.png\" alt=\"\" class=\"wp-image-170\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-1.png 829w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-1-300x61.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-1-768x157.png 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When sshd service can&#8217;t start nomally,and output wrong imformation.Input &#8216;systemctl status sshd&#8217; to check the details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.Check configuration files.Configuration files are <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">\/etc\/ssh\/ssh_config <\/mark><\/strong>and <strong>\/etc\/ssh\/sshd_config<\/strong>.Before checking files,you can close SELinux and firewall,or manage ports of SELinux,or release ports of firewalld.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"146\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-2.png\" alt=\"\" class=\"wp-image-171\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-2.png 880w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-2-300x50.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-2-768x127.png 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the file <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">\/etc\/ssh\/sshd_config<\/mark><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Permit root account login.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"100\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-3.png\" alt=\"\" class=\"wp-image-172\" style=\"width:378px;height:auto\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-3.png 369w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-3-300x81.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This part control IP addresses and port of sshd.The default port of sshd is 22.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"255\" height=\"92\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-4.png\" alt=\"\" class=\"wp-image-173\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After modification of sshd configuration file.Input &#8216;systemctl restart sshd&#8217; to restart sshd service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.Input &#8216;<strong>netstat -tnlp |grep sshd<\/strong>&#8216; to check status of ports.The port 22 must be listening.If port 22 is not listening,check sshd service or configuration file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"67\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-22.png\" alt=\"\" class=\"wp-image-206\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-22.png 907w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-22-300x22.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-22-768x57.png 768w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4.Check ports of security group and configure security group rule.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"242\" height=\"468\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-6.png\" alt=\"\" class=\"wp-image-176\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-6.png 242w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-6-155x300.png 155w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Choose your security group and configure ports.You can add,modify,delete rules by this page.There inbound rules and outbound rules.A rule contain protocol,port,description,and so on. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"748\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-7-1024x748.png\" alt=\"\" class=\"wp-image-177\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-7-1024x748.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-7-300x219.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-7-768x561.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-7.png 1237w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The default port of ssh is 22,port 22 must be released.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"33\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-8-1024x33.png\" alt=\"\" class=\"wp-image-178\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-8-1024x33.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-8-300x10.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-8-768x24.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-8.png 1162w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If port 22 is not exist,click &#8216;Add Rule&#8217; to release port 22.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5.Access Elastic IP address(EIP).When the webserver is running(like apache,nginx,and so on),you can visit the Elastic IP address of cloud server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"846\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-10-1024x846.png\" alt=\"\" class=\"wp-image-181\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-10-1024x846.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-10-300x248.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-10-768x634.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-10.png 1211w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After checking,you can login and visit your cloud server by  ssh.You can input &#8216;ssh &#8220;username&#8221;@&#8221;EIP&#8221;&#8216; in your windows &#8216;cmd&#8217; page.There are many remote tools like Cloudshell,Xshell,and so on.You can login remotely by these tools.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"240\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-11.png\" alt=\"\" class=\"wp-image-182\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-11.png 840w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-11-300x86.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/06\/image-11-768x219.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Premise:The cloud server can logging by local method(like VNC),but remote logging is unavailable.The cloud server can&#8217;t log in by SSH,or by remote tools like Cloudshell,Xshell.How to solve the problem? First,log in the cloud server by correct usermane and password. This is the checklist to solve the problem: 1.Input &#8216;systemctl status sshd&#8216; in the cloud server [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":6,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":207,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/167\/revisions\/207"}],"wp:attachment":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}