{"id":38,"date":"2019-04-16T18:56:25","date_gmt":"2019-04-16T18:56:25","guid":{"rendered":"https:\/\/serverhub.com\/kb\/?p=38"},"modified":"2019-04-16T20:27:34","modified_gmt":"2019-04-16T20:27:34","slug":"how-do-i-change-the-ssh-port-on-my-server","status":"publish","type":"post","link":"https:\/\/serverhub.com\/kb\/how-do-i-change-the-ssh-port-on-my-server\/","title":{"rendered":"How Do I Change the SSH Port on my Server?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">To Change the SSH Port for Your Linux Server<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>Connect to your server via SSH <\/li><li>Switch to the root user <\/li><li>Run the following command:vi \/etc\/ssh\/sshd_config<\/li><li>Locate the following line:#  Port 22<\/li><li>Remove&nbsp;<strong>#<\/strong>&nbsp;and change&nbsp;<strong>22<\/strong>&nbsp;to your desired port number.<\/li><li>Restart the&nbsp;<strong><g class=\"gr_ gr_11 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling\" id=\"11\" data-gr-id=\"11\">sshd<\/g><\/strong> service by running the following command:        service <g class=\"gr_ gr_65 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling\" id=\"65\" data-gr-id=\"65\">sshd<\/g> restart<\/li><\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To Change the SSH Port for Your Linux Server Connect to your server via SSH Switch to the root user Run the following command:vi \/etc\/ssh\/sshd_config Locate the following line:# Port 22 Remove&nbsp;#&nbsp;and change&nbsp;22&nbsp;to your desired port number. Restart the&nbsp;sshd service by running the following command: service sshd restart<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[20,19,21,10,17],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-linux-administration","tag-bare-metal-servers","tag-change-ssh-port","tag-how-to-change-ssh-port","tag-linux-administration","tag-ssh"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}