{"id":319,"date":"2016-08-03T09:49:40","date_gmt":"2016-08-03T02:49:40","guid":{"rendered":"http:\/\/www.st.ac.th\/krubuncha\/?p=319"},"modified":"2016-08-03T09:50:36","modified_gmt":"2016-08-03T02:50:36","slug":"how-to-change-the-ssh-port-in-linux-and-freebsd","status":"publish","type":"post","link":"https:\/\/www.st.ac.th\/krubuncha\/how-to-change-the-ssh-port-in-linux-and-freebsd\/","title":{"rendered":"How to change the SSH port in Linux and FreeBSD"},"content":{"rendered":"<h2 class=\"PostHeaderIcon-wrapper\"><a class=\"PostHeader\" href=\"http:\/\/www.osguides.net\/security\/61-how-to-change-the-ssh-port-in-linux-and-freebsd.html\">How to change the SSH port in Linux and FreeBSD<\/a><\/h2>\n<div class=\"PostContent\">\n<div class=\"article\">\n<div class=\"ultimatesbplugin_top\">Firstly we need to modify the ssh configuration file named \/etc\/ssh\/sshd_config.<br \/>\nThe location of the file is: \/etc\/ssh\/sshd_config<br \/>\nYou will need to open the file using your favorite text editor and find the line:#Port 22<\/p>\n<p>The default port for SSH is 22 and # is there because the line is commented. If you want to change this port you need simply to uncomment the line deleting the # sign in front of it and if you want to change it to 12134 for example the line should looks like this:<\/p>\n<p>Port 12134<\/p>\n<p>Once this is done you will need to restart the SSH daemon service. Here is how it should be done:<br \/>\nIn the most linux distribution you can do it using the command:<br \/>\nroot@somebox ~$ \/etc\/init.d\/sshd restart<\/p>\n<p>In FreeBSD this should be done using the command:<br \/>\nroot@somebox ~$ \/etc\/rc.d\/sshd reload<\/p>\n<p>Now you can login over SSH to the new port and the old one won&#8217;t be active for SSH connections anymore.<\/p>\n<p>Have fun.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to change the SSH port in Linux and FreeBSD Firstly we need to modify the ssh configuration file named \/etc\/ssh\/sshd_config. The location of the <a class=\"mh-excerpt-more\" href=\"https:\/\/www.st.ac.th\/krubuncha\/how-to-change-the-ssh-port-in-linux-and-freebsd\/\" title=\"How to change the SSH port in Linux and FreeBSD\">[\u0e2d\u0e48\u0e32\u0e19\u0e15\u0e48\u0e2d]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":320,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-319","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?fit=200%2C200&ssl=1","blog_post_layout_featured_media_urls":{"thumbnail":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=150%2C150&ssl=1",150,150,true],"full":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?fit=200%2C200&ssl=1",200,200,false]},"categories_names":{"1":{"name":"\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e04\u0e2d\u0e21\u0e1e\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e2d\u0e23\u0e4c","link":"https:\/\/www.st.ac.th\/krubuncha\/category\/%e0%b8%9a%e0%b8%97%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b8%84%e0%b8%ad%e0%b8%a1%e0%b8%9e%e0%b8%b4%e0%b8%a7%e0%b9%80%e0%b8%95%e0%b8%ad%e0%b8%ad%e0%b8%a3%e0%b9%8c\/"}},"tags_names":[],"comments_number":0,"wpmagazine_modules_lite_featured_media_urls":{"thumbnail":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=150%2C150&ssl=1",150,150,true],"cvmm-medium":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=200%2C200&ssl=1",200,200,true],"cvmm-medium-plus":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=200%2C200&ssl=1",200,200,true],"cvmm-portrait":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=200%2C200&ssl=1",200,200,true],"cvmm-medium-square":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=200%2C200&ssl=1",200,200,true],"cvmm-large":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=200%2C200&ssl=1",200,200,true],"cvmm-small":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?resize=130%2C95&ssl=1",130,95,true],"full":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/08\/ssh-e1470192558776.png?fit=200%2C200&ssl=1",200,200,false]},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Mvvj-59","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":2,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/319\/revisions\/322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/media\/320"}],"wp:attachment":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}