{"id":1714,"date":"2021-09-07T12:54:19","date_gmt":"2021-09-07T12:54:19","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=1714"},"modified":"2021-09-07T12:54:34","modified_gmt":"2021-09-07T12:54:34","slug":"1714","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/1714\/","title":{"rendered":"Steps to Change SSH Port of a Server"},"content":{"rendered":"<p>Port 22 is that the default port used by a Linux SSH Server (Open SSH). This can be not simply best-known to the server administrators however the hackers and attackers as well. Well incase you have implemented totally different security measures for your web hosting server, then it should not be a priority for you. However, changing the port of your SSH will add the safety of your server.<\/p>\n<p>Changing the <strong>default port 22<\/strong> to something else on your hosting server is one thing like preventing the hackers from accessing your server from the front door. Though you should to note that this method wouldn&#8217;t make your server 100% safe from intrusion, however it will definitely keep professional hackers busy with finding alternative vulnerabilities on the server and it might enhance the SSH Security of Server.<\/p>\n<p>Following are the steps that shows how to change the SSH port of a Linux Hosting Server ?<\/p>\n<p>Step 1 : Login to your server as Root administrator<\/p>\n<p>Step 2 : Search for the sshd_config file (it can be found in \/etc\/ssh directory) and edit it in this file.<\/p>\n<blockquote><p>vim \/etc\/ssh\/sshd_config<\/p><\/blockquote>\n<p>Step 3 : After that search for a line that contains :<\/p>\n<blockquote><p>Port 22<\/p><\/blockquote>\n<p>Step 4 : You have to amend the port number with something of your preference .<\/p>\n<p>Note : You have to make sure that the new port number is totally free and isn\u2019t used by any other service.<\/p>\n<p>Step 5 : Once you&#8217;re certain regarding the changes, make sure that you Save the file<\/p>\n<p>Step 6 : You have to then restart sshd using the command given below:<\/p>\n<blockquote><p>\/etc\/init.d\/sshd restart<\/p><\/blockquote>\n<p>Step 7 : With blocking Port 22, make changes to the firewall and allowing the new Port number used by SSH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Port 22 is that the default port used by a Linux SSH Server (Open SSH). This can be not simply best-known to the server administrators however the hackers and attackers as well. Well incase you have implemented totally different security measures for your web hosting server, then it should not be a priority for you. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1714","post","type-post","status-publish","format-standard","hentry","category-tech-support"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Steps to Change SSH Port of a Server - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/1714\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Steps to Change SSH Port of a Server - OWS KB\" \/>\n<meta property=\"og:description\" content=\"Port 22 is that the default port used by a Linux SSH Server (Open SSH). This can be not simply best-known to the server administrators however the hackers and attackers as well. Well incase you have implemented totally different security measures for your web hosting server, then it should not be a priority for you. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/1714\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-07T12:54:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-07T12:54:34+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/1714\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/1714\/\",\"name\":\"Steps to Change SSH Port of a Server - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-09-07T12:54:19+00:00\",\"dateModified\":\"2021-09-07T12:54:34+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/1714\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/1714\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/1714\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/1714\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/1714\/\",\"name\":\"Steps to Change SSH Port of a Server\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=1714"}],"version-history":[{"count":2,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1714\/revisions"}],"predecessor-version":[{"id":1716,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1714\/revisions\/1716"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=1714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=1714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}