{"id":6755,"date":"2020-10-27T05:59:16","date_gmt":"2020-10-27T02:59:16","guid":{"rendered":"https:\/\/www.iraq-serv.com\/?p=6755"},"modified":"2021-06-09T06:22:50","modified_gmt":"2021-06-09T03:22:50","slug":"change-ssh-port","status":"publish","type":"post","link":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/","title":{"rendered":"How to change SSH port on the server?"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\">How to change SSH port on the server<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">what is SSH? <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting to change SSH port on the server, What is ssh? The Secure Shell Protocol is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Enter the SSH via <a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" target=\"_blank\" rel=\"noreferrer noopener\">Putty<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">We write the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">The following window will appear<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"590\" height=\"301\" src=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-1.png\" alt=\"Change SSH Port On The Server-1\" class=\"wp-image-9429\" srcset=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-1.png 590w, https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-1-300x153.png 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">We change the original port 22 to your port of four numbers and we will use 8899 as an example in the explanation with the deletion of # to be as follows:-<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"592\" height=\"303\" src=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-2.png\" alt=\"Change SSH Port On The Server-2\" class=\"wp-image-9428\" srcset=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-2.png 592w, https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-2-300x154.png 300w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">From the keyboard button, press Ctrl + X, then Y, and then Enter<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Then restart the SSH service using the following command:-<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">systemctl restart sshd.service<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Now you can re-enter the new port<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">How to change the shell port in CSF Firewall<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">If you have a CSF firewall in the server, you must add the new port number in the incoming and outgoing TCP fields. We enter the WHM panel, then ConfigServer Security &amp; Firewall, choose Firewall Configuration, and search for TCP_IN as shown in the following image:-<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"873\" height=\"200\" src=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-3.png\" alt=\"Change SSH Port On The Server-3\" class=\"wp-image-9427\" srcset=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-3.png 873w, https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-3-300x69.png 300w, https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/Change-SSH-Port-On-The-Server-3-768x176.png 768w\" sizes=\"(max-width: 873px) 100vw, 873px\" \/><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Add a new SSH port at the end of the line as shown in the image above<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Save the changes and restart the CSF firewall to install the settings<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Thus, the SSH port on the server has been successfully changed<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">If you have a problem or inquiry, do not hesitate to contact us via the <a href=\"https:\/\/www.iraq-serv.com\/en\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact Us<\/a> page<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change SSH port on the server what is SSH? Before starting to change SSH port on the server, What is ssh? The Secure Shell Protocol is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":9422,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[267,268],"class_list":["post-6755","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-hosting","tag-change-ssh-port","tag-ssh-port"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to change SSH port on the server? - Iraq Serv<\/title>\n<meta name=\"description\" content=\"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change SSH port on the server? - Iraq Serv\" \/>\n<meta property=\"og:description\" content=\"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\" \/>\n<meta property=\"og:site_name\" content=\"Iraq Serv\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-27T02:59:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-09T03:22:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png\" \/>\n\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t<meta property=\"og:image:height\" content=\"250\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"IRAQ SERV\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"IRAQ SERV\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\"},\"author\":{\"name\":\"IRAQ SERV\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/1da80f9a15dbae863a85fa42a8644d45\"},\"headline\":\"How to change SSH port on the server?\",\"datePublished\":\"2020-10-27T02:59:16+00:00\",\"dateModified\":\"2021-06-09T03:22:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\"},\"wordCount\":260,\"publisher\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png\",\"keywords\":[\"change SSH port\",\"ssh port\"],\"articleSection\":[\"Web Hosting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\",\"url\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\",\"name\":\"How to change SSH port on the server? - Iraq Serv\",\"isPartOf\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png\",\"datePublished\":\"2020-10-27T02:59:16+00:00\",\"dateModified\":\"2021-06-09T03:22:50+00:00\",\"description\":\"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage\",\"url\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png\",\"contentUrl\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png\",\"width\":350,\"height\":250,\"caption\":\"change the SSH port\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iraq-serv.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change SSH port on the server?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#website\",\"url\":\"https:\/\/www.iraq-serv.com\/en\/\",\"name\":\"Iraq Serv\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iraq-serv.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#organization\",\"name\":\"IRAQ SERV\",\"url\":\"https:\/\/www.iraq-serv.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/IRAQ-SERV-IRAQI-HOSTING-AMP.png\",\"contentUrl\":\"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/IRAQ-SERV-IRAQI-HOSTING-AMP.png\",\"width\":153,\"height\":51,\"caption\":\"IRAQ SERV\"},\"image\":{\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/1da80f9a15dbae863a85fa42a8644d45\",\"name\":\"IRAQ SERV\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10857113a3515c550a4405ff6e59f41529a2372a20ffa63737834a8ffb5ad07b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10857113a3515c550a4405ff6e59f41529a2372a20ffa63737834a8ffb5ad07b?s=96&d=mm&r=g\",\"caption\":\"IRAQ SERV\"},\"url\":\"https:\/\/www.iraq-serv.com\/en\/author\/iraq-serv\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to change SSH port on the server? - Iraq Serv","description":"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/","og_locale":"en_US","og_type":"article","og_title":"How to change SSH port on the server? - Iraq Serv","og_description":"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.","og_url":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/","og_site_name":"Iraq Serv","article_published_time":"2020-10-27T02:59:16+00:00","article_modified_time":"2021-06-09T03:22:50+00:00","og_image":[{"width":350,"height":250,"url":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png","type":"image\/png"}],"author":"IRAQ SERV","twitter_card":"summary_large_image","twitter_misc":{"Written by":"IRAQ SERV","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#article","isPartOf":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/"},"author":{"name":"IRAQ SERV","@id":"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/1da80f9a15dbae863a85fa42a8644d45"},"headline":"How to change SSH port on the server?","datePublished":"2020-10-27T02:59:16+00:00","dateModified":"2021-06-09T03:22:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/"},"wordCount":260,"publisher":{"@id":"https:\/\/www.iraq-serv.com\/en\/#organization"},"image":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png","keywords":["change SSH port","ssh port"],"articleSection":["Web Hosting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/","url":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/","name":"How to change SSH port on the server? - Iraq Serv","isPartOf":{"@id":"https:\/\/www.iraq-serv.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage"},"image":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png","datePublished":"2020-10-27T02:59:16+00:00","dateModified":"2021-06-09T03:22:50+00:00","description":"In this article, we will explain how to change the SSH port from a server with CSF settings to protect the server from attacks via SSH in tedious detail.","breadcrumb":{"@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#primaryimage","url":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png","contentUrl":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/change-the-SSH-port.png","width":350,"height":250,"caption":"change the SSH port"},{"@type":"BreadcrumbList","@id":"https:\/\/www.iraq-serv.com\/en\/change-ssh-port\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iraq-serv.com\/en\/"},{"@type":"ListItem","position":2,"name":"How to change SSH port on the server?"}]},{"@type":"WebSite","@id":"https:\/\/www.iraq-serv.com\/en\/#website","url":"https:\/\/www.iraq-serv.com\/en\/","name":"Iraq Serv","description":"","publisher":{"@id":"https:\/\/www.iraq-serv.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iraq-serv.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iraq-serv.com\/en\/#organization","name":"IRAQ SERV","url":"https:\/\/www.iraq-serv.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iraq-serv.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/IRAQ-SERV-IRAQI-HOSTING-AMP.png","contentUrl":"https:\/\/www.iraq-serv.com\/en\/wp-content\/uploads\/IRAQ-SERV-IRAQI-HOSTING-AMP.png","width":153,"height":51,"caption":"IRAQ SERV"},"image":{"@id":"https:\/\/www.iraq-serv.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/1da80f9a15dbae863a85fa42a8644d45","name":"IRAQ SERV","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iraq-serv.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10857113a3515c550a4405ff6e59f41529a2372a20ffa63737834a8ffb5ad07b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10857113a3515c550a4405ff6e59f41529a2372a20ffa63737834a8ffb5ad07b?s=96&d=mm&r=g","caption":"IRAQ SERV"},"url":"https:\/\/www.iraq-serv.com\/en\/author\/iraq-serv\/"}]}},"_links":{"self":[{"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/posts\/6755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/comments?post=6755"}],"version-history":[{"count":9,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/posts\/6755\/revisions"}],"predecessor-version":[{"id":9434,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/posts\/6755\/revisions\/9434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/media\/9422"}],"wp:attachment":[{"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/media?parent=6755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/categories?post=6755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iraq-serv.com\/en\/wp-json\/wp\/v2\/tags?post=6755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}