{"id":60,"date":"2020-11-01T19:37:28","date_gmt":"2020-11-01T19:37:28","guid":{"rendered":"https:\/\/hostandtech.com\/help\/?p=60"},"modified":"2021-10-31T14:15:58","modified_gmt":"2021-10-31T14:15:58","slug":"configure-ssh-on-centos-7","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/","title":{"rendered":"How to Change SSH Default Port On Linux"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"60\" class=\"elementor elementor-60\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-38a5d89 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"38a5d89\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1314039\" data-id=\"1314039\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-08c7664 elementor-widget elementor-widget-text-editor\" data-id=\"08c7664\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this part, we are going to learn how to change <a href=\"https:\/\/en.wikipedia.org\/wiki\/Secure_Shell\" target=\"_blank\" rel=\"noopener\">SSH<\/a> default port on CentOS7.<br \/>The default SSH port on most Linux\/Unix systems is TCP port 22. This can be changed easily to a custom port not used by other Applications in the system.<\/p><p>Even though change SSH default port 22 may not gain you much from security point of view, there are still some advantages that goes with it:<\/p><ul><li>reduces attack surface by shielding your server against automated random attacks that targets services running on default ports.<\/li><li>attacks that target exploitation of vulnerabilities associated with specific versions of OpenSSH and its crypto libraries.<\/li><li>reduces the size of the log files as it stops brute forced failed login attempts directed towards the default SSH port.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2573d5a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2573d5a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5389377\" data-id=\"5389377\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-16222b9 elementor-widget elementor-widget-heading\" data-id=\"16222b9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Notes Before Changing The SSH Port:<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c8460bb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c8460bb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8099844\" data-id=\"8099844\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a00aea2 elementor-widget elementor-widget-text-editor\" data-id=\"a00aea2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li>It is better to specify a\u00a0<strong>4<\/strong>\u00a0or\u00a0<strong>5<\/strong>\u00a0digit port. Also, remember to uses a free SSH port.<\/li><li>If a firewall is used in the data center network, be sure to inform the data center of the desired port to open it.<\/li><li>Be sure to write down the port you want to allocate to SSH.<\/li><li>Be careful to change the SSH port as any mistake may cause you to have trouble accessing the server.<\/li><li>If you do not use SELinux, you should just disable it to prevent any issue on the function of your server.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-17da14c elementor-widget elementor-widget-heading\" data-id=\"17da14c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Change SSH port to use a different Port on Linux<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-485dc00 elementor-widget elementor-widget-text-editor\" data-id=\"485dc00\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li><p>First disable SELinux Before Changing SSH Port: To disable\u00a0<strong>SELinux<\/strong>, open the below file and set the mode to\u00a0<strong>disabled<\/strong>.<\/p><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-02910ce elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"02910ce\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eba54fc\" data-id=\"eba54fc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8c974cc elementor-widget elementor-widget-code-highlight\" data-id=\"8c974cc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>\/etc\/selinux\/config<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-37b2345 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"37b2345\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f030727\" data-id=\"f030727\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f3ff426 elementor-widget elementor-widget-text-editor\" data-id=\"f3ff426\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li><p>Edit The sshd File To Change SSH Port: go to\u00a0<strong>sshd_config<\/strong> file editing mode with the following command.<\/p><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-cf9a0c0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cf9a0c0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9a89be3\" data-id=\"9a89be3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7a37145 elementor-widget elementor-widget-code-highlight\" data-id=\"7a37145\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>nano \/etc\/ssh\/sshd_config<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d2e5545 elementor-widget elementor-widget-text-editor\" data-id=\"d2e5545\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If the\u00a0<strong>nano<\/strong> package is not installed, see <a href=\"https:\/\/hostandtech.com\/help\/linux\/how-to-install-and-use-nano-text-editor-commands-in-linux\/\" target=\"_blank\" rel=\"noopener\">How to Install and use Nano Text Editor Commands in Linux<\/a><\/p><ul><li>Change the number of default port 22 to another one.<\/li><li>Then add the new port to your firewall to prevent any disruption, using this command after changing SSH port.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-63e0eda elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"63e0eda\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b623c03\" data-id=\"b623c03\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4c11d74 elementor-widget elementor-widget-code-highlight\" data-id=\"4c11d74\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>sudo firewall-cmd --zone=public --permanent --add-port=14252\/tcp<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b2af818 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b2af818\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2409a45\" data-id=\"2409a45\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bf98da5 elementor-widget elementor-widget-text-editor\" data-id=\"bf98da5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li><p>Restart sshd Service<\/p><\/li><\/ul><p>\u00a0if you faced error with restarting sshd, try to reboot the server. Once the server was ready, you can easily connect to sshd and the new port number should be used instead of port 22 but the case is, this time you are more secure than the last connection!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3cbadab elementor-widget elementor-widget-elementor-faq-schema\" data-id=\"3cbadab\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-faq-schema.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t                                    <script type=\"application\/ld+json\">\n                    {\n                        \"@context\": \"https:\/\/schema.org\",\n                        \"@type\": \"FAQPage\",\n                        \"mainEntity\": [\n                         {\n                            \"@type\": \"Question\",\n                            \"name\": \"What Should I Know Before Changing The SSH Port?\",\n                            \"acceptedAnswer\": {\n                                \"@type\": \"Answer\",\n                                \"text\": \"&lt;ul&gt;&lt;li&gt;It is better to specify a\u00a0&lt;strong&gt;4&lt;\/strong&gt;\u00a0or\u00a0&lt;strong&gt;5&lt;\/strong&gt;\u00a0digit port. Also, remember to uses a free SSH port.&lt;\/li&gt;&lt;li&gt;If a firewall is used in the data center network, be sure to inform the data center of the desired port to open it.&lt;\/li&gt;&lt;li&gt;Be sure to write down the port you want to allocate to SSH.&lt;\/li&gt;&lt;li&gt;Be careful to change the SSH port as any mistake may cause you to have trouble accessing the server.&lt;\/li&gt;&lt;li&gt;If you do not use SELinux, you should just disable it to prevent any issue on the function of your server.&lt;\/li&gt;&lt;\/ul&gt;\"\n                            }\n                                                    },\n                                             {\n                            \"@type\": \"Question\",\n                            \"name\": \"How To Change SSH port to use a different Port on Linux?\",\n                            \"acceptedAnswer\": {\n                                \"@type\": \"Answer\",\n                                \"text\": \"&lt;ul&gt;&lt;li&gt;First disable SELinux Before Changing SSH Port: To disable\u00a0&lt;strong&gt;SELinux&lt;\/strong&gt;, open the below file and set the mode to\u00a0&lt;strong&gt;disabled&lt;\/strong&gt;.&lt;\/li&gt;&lt;li&gt;Edit The sshd File To Change SSH Port: go to\u00a0&lt;strong&gt;sshd_config&lt;\/strong&gt; file editing mode with the following command.&lt;\/li&gt;&lt;li&gt;Change the number of default port 22 to another one.&lt;\/li&gt;&lt;li&gt;Then add the new port to your firewall to prevent any disruption, using this command after changing SSH port.&lt;\/li&gt;&lt;li&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Restart sshd Service&lt;\/p&gt;&lt;\/li&gt;&lt;\/ul&gt;&lt;p&gt;\u00a0if you faced error with restarting sshd, try to reboot the server. Once the server was ready, you can easily connect to sshd and the new port number should be used instead of port 22 but the case is, this time you are more secure than the last connection&lt;\/p&gt;&lt;\/li&gt;&lt;\/ul&gt;\"\n                            }\n                                                    }\n                    ]\n                    }\n                <\/script>\n                    \t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>In this part, we are going to learn how to change SSH default port on CentOS7. The default SSH port on most Linux\/Unix systems is TCP port 22. This can be changed easily to a custom port not used by other Applications in the system. Even though change SSH default port 22 may not gain [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2412,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,125],"tags":[124,122],"class_list":["post-60","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-directadmin","tag-centos","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Change SSH Default Port To Have More Secure SSH Connection In Linux<\/title>\n<meta name=\"description\" content=\"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change SSH Default Port To Have More Secure SSH Connection In Linux\" \/>\n<meta property=\"og:description\" content=\"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"STS Host and Tech Knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-01T19:37:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-31T14:15:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\" \/>\n\t<meta property=\"og:image:width\" content=\"256\" \/>\n\t<meta property=\"og:image:height\" content=\"256\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Host&amp;Tech Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Change SSH Default Port To Have More Secure SSH Connection In Linux\" \/>\n<meta name=\"twitter:description\" content=\"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Host&amp;Tech Support\" \/>\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:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\"},\"author\":{\"name\":\"Host&amp;Tech Support\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83\"},\"headline\":\"How to Change SSH Default Port On Linux\",\"datePublished\":\"2020-11-01T19:37:28+00:00\",\"dateModified\":\"2021-10-31T14:15:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\"},\"wordCount\":389,\"publisher\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\",\"keywords\":[\"CentOS\",\"Linux\"],\"articleSection\":[\"cPanel\",\"DirectAdmin\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\",\"url\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\",\"name\":\"Change SSH Default Port To Have More Secure SSH Connection In Linux\",\"isPartOf\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\",\"datePublished\":\"2020-11-01T19:37:28+00:00\",\"dateModified\":\"2021-10-31T14:15:58+00:00\",\"description\":\"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption\",\"breadcrumb\":{\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage\",\"url\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\",\"contentUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png\",\"width\":256,\"height\":256,\"caption\":\"CentOS SSH\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hostandtech.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change SSH Default Port On Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hostandtech.com\/help\/#website\",\"url\":\"https:\/\/hostandtech.com\/help\/\",\"name\":\"STS Host and Tech Knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hostandtech.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\",\"name\":\"STS Host and Tech Inc\",\"url\":\"https:\/\/hostandtech.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png\",\"contentUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png\",\"width\":630,\"height\":270,\"caption\":\"STS Host and Tech Inc\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/stshostandtech\",\"https:\/\/x.com\/stshostandtech\",\"https:\/\/www.instagram.com\/stshostandtech\",\"https:\/\/www.youtube.com\/channel\/UCqJOPwWE0ILTeIScaND7enw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83\",\"name\":\"Host&amp;Tech Support\",\"sameAs\":[\"https:\/\/hostandtech.com\/help\"],\"url\":\"https:\/\/hostandtech.com\/help\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change SSH Default Port To Have More Secure SSH Connection In Linux","description":"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption","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:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"Change SSH Default Port To Have More Secure SSH Connection In Linux","og_description":"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption","og_url":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/","og_site_name":"STS Host and Tech Knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2020-11-01T19:37:28+00:00","article_modified_time":"2021-10-31T14:15:58+00:00","og_image":[{"width":256,"height":256,"url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","type":"image\/png"}],"author":"Host&amp;Tech Support","twitter_card":"summary_large_image","twitter_title":"Change SSH Default Port To Have More Secure SSH Connection In Linux","twitter_description":"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption","twitter_image":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"Host&amp;Tech Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/"},"author":{"name":"Host&amp;Tech Support","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83"},"headline":"How to Change SSH Default Port On Linux","datePublished":"2020-11-01T19:37:28+00:00","dateModified":"2021-10-31T14:15:58+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/"},"wordCount":389,"publisher":{"@id":"https:\/\/hostandtech.com\/help\/#organization"},"image":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","keywords":["CentOS","Linux"],"articleSection":["cPanel","DirectAdmin"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/","url":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/","name":"Change SSH Default Port To Have More Secure SSH Connection In Linux","isPartOf":{"@id":"https:\/\/hostandtech.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","datePublished":"2020-11-01T19:37:28+00:00","dateModified":"2021-10-31T14:15:58+00:00","description":"Change SSH default port in Linux by editing The sshd File by nano text editor, adding the new port to the firewall to prevent any disruption","breadcrumb":{"@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#primaryimage","url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","contentUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2020\/11\/ssh.png","width":256,"height":256,"caption":"CentOS SSH"},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/help\/cpanel\/configure-ssh-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/help\/"},{"@type":"ListItem","position":2,"name":"How to Change SSH Default Port On Linux"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/help\/#website","url":"https:\/\/hostandtech.com\/help\/","name":"STS Host and Tech Knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/help\/#organization","name":"STS Host and Tech Inc","url":"https:\/\/hostandtech.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png","contentUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png","width":630,"height":270,"caption":"STS Host and Tech Inc"},"image":{"@id":"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech","https:\/\/www.instagram.com\/stshostandtech","https:\/\/www.youtube.com\/channel\/UCqJOPwWE0ILTeIScaND7enw"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83","name":"Host&amp;Tech Support","sameAs":["https:\/\/hostandtech.com\/help"],"url":"https:\/\/hostandtech.com\/help\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":154,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":8918,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/60\/revisions\/8918"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/media\/2412"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}