{"id":33973,"date":"2020-08-22T14:33:58","date_gmt":"2020-08-22T19:33:58","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=33973"},"modified":"2022-06-03T03:32:46","modified_gmt":"2022-06-03T08:32:46","slug":"how-and-why-to-change-the-default-ssh-port-on-linux","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/","title":{"rendered":"How to Change the Default SSH Port on Linux"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-34043\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we will show you how to change the SSH default port in Linux, and go over why changing this default port is a good idea. <strong>IMPORTANT: Before we go any further, you should understand that this is not a solution that will prevent or deter a determined hacker to attack your SSH service. It is merely a measure to help you avoid the thousands of automated bots running all the time scanning vast ranges of IP space searching for standard SSH ports being open. Preventing a determined hacker from brute-forcing your SSH service is beyond the scope of this article.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-34044\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/configuring-setting-ssh-default-port-on-linux-server-VPS.jpg\" alt=\"\" width=\"120\" height=\"121\" \/>SSH, also known as Secure Shell, is the most widely-used protocol for connecting to and managing Linux systems remotely. SSH offers strong encryption and authentication along with excellent customizability, and using SSH gives you the freedom of accessing a remote machine. You can run services and software as if you were physically using the machine, no matter where you are.<\/p>\n<p>By default, SSH runs on port 22. Since this is common knowledge, this port often becomes a target for brute force attacks. Because this provides full access to your server&#8217;s OS, people with malicious intent will often target port 22 more than any other port. Changing the default SSH port will prevent automated attacks that don\u2019t spend the time to rotate ports when targeting a Linux Server. To protect your server from a brute force attack, you should change the default SSH port to something else.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f4499d29cf4\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f4499d29cf4\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Step-1-Connect-via-SSH\" >Step 1. Connect via SSH<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Step-2-Select-a-New-Port-Number\" >Step 2. Select a New Port Number<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Step-3-Configure-the-Firewall\" >Step 3. Configure the Firewall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Step-4-Change-the-Default-SSH-Port\" >Step 4. Change the Default SSH Port<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#Step-5-Connect-to-SSH-using-the-new-Port\" >Step 5. Connect to SSH using the new Port<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>A Linux VPS with root access enabled, or a user with sudo privileges. Our VPSes all come with root access, so you should have no issues if you use one of our <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">Managed Linux VPS<\/a>es.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Connect-via-SSH\"><\/span>Step 1. Connect via SSH<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Log in to your server using SSH as the root user (or as a user with sudo privileges). You can do that by entering this command:<\/p>\n<pre>ssh root@<span style=\"color: #ff0000;\">Server_IP_Address<\/span> -p <span style=\"color: #ff0000;\">Port_Number<\/span><\/pre>\n<p>Remember to replace \u2018root\u2019 with your username if you are not using the root user. Also, replace <span style=\"color: #ff0000;\">Server_IP_Address<\/span> and <span style=\"color: #ff0000;\">Port_Number<\/span> with your actual IP address and SSH port number. If you have never changed the port number before, this should be 22.<\/p>\n<p>Once you are logged in, you can proceed to the next step.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Select-a-New-Port-Number\"><\/span>Step 2. Select a New Port Number<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before changing the default SSH port, you will need to select a new port for SSH to listen on. You can select any unused port. In Linux, port numbers below 1024 are reserved for well-known services and could be more easily discovered. So it is recommended to select a port above 1024.<\/p>\n<p>As an example, we will change the default SSH port to 5437.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Configure-the-Firewall\"><\/span>Step 3. Configure the Firewall<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before changing the default SSH port, you will need to configure the firewall on your server to allow traffic on the new SSH port.<\/p>\n<p>On Ubuntu\/Debian-based operating systems, you can open the new SSH port 5437 using the <code>UFW<\/code> command:<\/p>\n<pre>ufw allow 5437\/tcp\nufw reload<\/pre>\n<p>On CentOS\/RHEL\/Fedora-based operating systems, you can open the new SSH port 5437 using the <code>firewall-cmd<\/code> command:<\/p>\n<pre>firewall-cmd --permanent --zone=public --add-port=5437\/tcp\nfirewall-cmd --reload<\/pre>\n<p>At this point, your server is configured to allow traffic on the new SSH port.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Change-the-Default-SSH-Port\"><\/span>Step 4. Change the Default SSH Port<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can change the SSH default port by editing the file <code>\/etc\/ssh\/sshd_config<\/code>.<\/p>\n<pre>nano \/etc\/ssh\/sshd_config<\/pre>\n<p>Find the following line:<\/p>\n<pre># Port 22<\/pre>\n<p>Uncomment the line by removing the pound symbol &#8220;#&#8221;\u00a0, then replace it with the following line:<\/p>\n<pre>Port 5437<\/pre>\n<p>Save and close the file when you are finished. Then, restart the SSH service to apply the changes.<\/p>\n<pre>systemctl restart ssh<\/pre>\n<p>Next, verify the SSH listening port with the following command:<\/p>\n<pre>netstat -plntu | grep 5437<\/pre>\n<p>You should see the following output:<\/p>\n<pre>tcp        0      0 0.0.0.0:5437            0.0.0.0:*               LISTEN      5134\/sshd       \ntcp6       0      0 :::5437                 :::*                    LISTEN      5134\/sshd       \n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Connect-to-SSH-using-the-new-Port\"><\/span>Step 5. Connect to SSH using the new Port<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now, log out from your current SSH session and connect your server again using the new port.<\/p>\n<pre>ssh -p 5437 root@<span style=\"color: #ff0000;\">Server_IP_Address<\/span><\/pre>\n<p>If everything is fine, you should connect to the server and see a password prompt with no problems.<\/p>\n<p>Congratulations! You have successfully changed the default SSH port on your Linux machine.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-34045\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/server-management-done-by-technical-support-team-fully-managed-set-ssh.jpg\" alt=\"\" width=\"120\" height=\"121\" \/>You don\u2019t have to change the default SSH port in your Linux VPS on your own if you use one of our fully managed <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\" target=\"_blank\" rel=\"noopener\">Linux VPS hosting<\/a> solutions. Our technical support team will gladly help you change your SSH port to a custom one without you having to do a thing. They are available 24\/7 and will help you with any aspect of managing your server.<\/p>\n<p>If you found this tutorial helpful, we would appreciate you sharing it with your friends through social media by using our share shortcuts, or by leaving a comment in our comments section. Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will show you how to change the SSH default port in Linux, and go over why &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Change the Default SSH Port on Linux\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#more-33973\" aria-label=\"Read more about How to Change the Default SSH Port on Linux\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":34043,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1703,21],"tags":[1847,27,136,65,68],"class_list":["post-33973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-tips-and-tricks","tag-custom-ssh-port","tag-linux","tag-port","tag-security","tag-ssh","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Change the Default SSH Port on Linux | RoseHosting<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to change the default SSH port on Linux. Find how to change a SSH port on a Linux OS\" \/>\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.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change the Default SSH Port on Linux\" \/>\n<meta property=\"og:description\" content=\"How to Change the Default SSH Port on Linux | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-22T19:33:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:32:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Change the Default SSH Port on Linux\",\"datePublished\":\"2020-08-22T19:33:58+00:00\",\"dateModified\":\"2022-06-03T08:32:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/\"},\"wordCount\":747,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\",\"keywords\":[\"custom SSH port\",\"Linux\",\"port\",\"security\",\"ssh\"],\"articleSection\":[\"Security\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/\",\"name\":\"How to Change the Default SSH Port on Linux | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\",\"datePublished\":\"2020-08-22T19:33:58+00:00\",\"dateModified\":\"2022-06-03T08:32:46+00:00\",\"description\":\"In this tutorial, you will learn how to change the default SSH port on Linux. Find how to change a SSH port on a Linux OS\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-and-why-to-change-the-default-ssh-port-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change the Default SSH Port on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Change the Default SSH Port on Linux | RoseHosting","description":"In this tutorial, you will learn how to change the default SSH port on Linux. Find how to change a SSH port on a Linux OS","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.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Change the Default SSH Port on Linux","og_description":"How to Change the Default SSH Port on Linux | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-08-22T19:33:58+00:00","article_modified_time":"2022-06-03T08:32:46+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Change the Default SSH Port on Linux","datePublished":"2020-08-22T19:33:58+00:00","dateModified":"2022-06-03T08:32:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/"},"wordCount":747,"commentCount":1,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg","keywords":["custom SSH port","Linux","port","security","ssh"],"articleSection":["Security","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/","url":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/","name":"How to Change the Default SSH Port on Linux | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg","datePublished":"2020-08-22T19:33:58+00:00","dateModified":"2022-06-03T08:32:46+00:00","description":"In this tutorial, you will learn how to change the default SSH port on Linux. Find how to change a SSH port on a Linux OS","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-and-why-to-change-the-default-ssh-port-on-linux.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-and-why-to-change-the-default-ssh-port-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Change the Default SSH Port on Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=33973"}],"version-history":[{"count":9,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33973\/revisions"}],"predecessor-version":[{"id":38071,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33973\/revisions\/38071"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/34043"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=33973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=33973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=33973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}