{"id":260,"date":"2021-06-27T13:39:19","date_gmt":"2021-06-27T13:39:19","guid":{"rendered":"https:\/\/mumbaiwebhosting.co.in\/portal\/?p=260"},"modified":"2022-02-25T02:51:28","modified_gmt":"2022-02-25T02:51:28","slug":"how-to-change-ssh-port-number-in-linux","status":"publish","type":"post","link":"https:\/\/mumbaiwebhosting.co.in\/portal\/how-to-change-ssh-port-number-in-linux\/","title":{"rendered":"How to change SSH port number in linux"},"content":{"rendered":"<p>Today we are going to know about &#8220;How to change SSH port number in linux&#8221;.<\/p>\n<p>1.First connect to your server via SSH using terminal emulator (PUTTY ).<\/p>\n<p>2.Changing of the SSH port number has to be done in sshd_config file.<\/p>\n<p>And the file &#8220;sshd_config&#8221; will be in the path &#8220;\/etc\/ssh\/&#8221;, So we have to access the path using the cd command .<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-259 size-full\" src=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd1.png\" alt=\"\" width=\"618\" height=\"194\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd1.png 618w, https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd1-300x94.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>3.Now use vi editor command to edit the file &#8220;sshd_config&#8221; and press &#8220;i&#8221; change the port number.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-258 size-full\" src=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd2.png\" alt=\"\" width=\"598\" height=\"343\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd2.png 598w, https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd2-300x172.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/p>\n<p>4.Here I am using 2244 instead of the default port 22.<\/p>\n<p>5.Now Save and close the file using press &#8220;ESc&#8221; key and type :wq and press enter..<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-256 size-full\" src=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd5.png\" alt=\"\" width=\"515\" height=\"528\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd5.png 515w, https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd5-293x300.png 293w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/p>\n<p>6.Make sure the port is allowed in your firewall and restart the sshd service to change the ssh port in Linux.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-257 size-full\" src=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd6.png\" alt=\"\" width=\"384\" height=\"39\" srcset=\"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd6.png 384w, https:\/\/mumbaiwebhosting.co.in\/portal\/wp-content\/uploads\/2021\/06\/sshd6-300x30.png 300w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we are going to know about &#8220;How to change SSH port number in linux&#8221;. 1.First connect to your server via SSH using terminal emulator (PUTTY ). 2.Changing of the&#8230; <a class=\"read-more-link\" href=\"https:\/\/mumbaiwebhosting.co.in\/portal\/how-to-change-ssh-port-number-in-linux\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/260"}],"collection":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/comments?post=260"}],"version-history":[{"count":2,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/260\/revisions\/290"}],"wp:attachment":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/media?parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/categories?post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/tags?post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}