{"id":7018,"date":"2017-09-24T16:50:06","date_gmt":"2017-09-24T08:50:06","guid":{"rendered":"http:\/\/rmohan.com\/?p=7018"},"modified":"2017-09-24T16:50:06","modified_gmt":"2017-09-24T08:50:06","slug":"change-openssh-port-or-listen-to-multiple-ssh-ports","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7018","title":{"rendered":"CHANGE OPENSSH PORT OR LISTEN TO MULTIPLE SSH PORTS"},"content":{"rendered":"<p>OpenSSH usually listens on TCP port 22. However, there are some people who wish to change OpenSSH port to avoid brute-force bot attacks or to avoid from being blocked by restrictive firewall.<\/p>\n<p>To change OpenSSH port, one only need to edit \u201c\/etc\/ssh\/sshd_config\u201d file and change the port at \u201cPort 22\u201d to something else, like \u201cPort 8080\u201d or \u201cPort 443\u201d<\/p>\n<p>#\/etc\/ssh\/sshd_config<br \/>\n# What ports, IPs and protocols we listen for<br \/>\nPort 8080<br \/>\nSave, and restart ssh server.<\/p>\n<p>sudo service ssh restart<br \/>\nAdditionally you can also configure OpenSSH to listen to multiple port (usually to avoid restrictive firewall rules)<\/p>\n<p>#\/etc\/ssh\/sshd_config<br \/>\n# What ports, IPs and protocols we listen for<br \/>\nPort 22<br \/>\nPort 8080<br \/>\nPort 443<br \/>\nThe example above shows a configuration which lets OpenSSH to listen to port 22, 443 (TLS\/SSL) and port 8080 (HTTP-PROXY), these are the ports that usually unblocked by corporate firewall.<\/p>\n<p>Don\u2019t forget to restart ssh service as soon as you\u2019ve save the file!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenSSH usually listens on TCP port 22. However, there are some people who wish to change OpenSSH port to avoid brute-force bot attacks or to avoid from being blocked by restrictive firewall.<\/p>\n<p>To change OpenSSH port, one only need to edit \u201c\/etc\/ssh\/sshd_config\u201d file and change the port at \u201cPort 22\u201d to something else, like \u201cPort [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7018"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7018"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7018\/revisions"}],"predecessor-version":[{"id":7019,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7018\/revisions\/7019"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}