{"id":1730,"date":"2017-11-17T19:45:25","date_gmt":"2017-11-17T19:45:25","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=1730"},"modified":"2018-04-27T15:41:10","modified_gmt":"2018-04-27T15:41:10","slug":"install-ssh-server-on-linux-debian-ubuntu-fedora-centos-redhat","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/install-ssh-server-on-linux-debian-ubuntu-fedora-centos-redhat\/","title":{"rendered":"Install SSH Server on Linux (Debian, Ubuntu, Fedora, CentOS, RedHat)"},"content":{"rendered":"<p><strong>Debian \/ Ubuntu<\/strong><\/p>\n<pre>sudo apt-get install -y openssh-server<\/pre>\n<p><strong>RPM based Distros, Fedora \/ CentOS \/ RedHat<\/strong><\/p>\n<pre>sudo dnf install -y openssh-server<\/pre>\n<p>or use yum<\/p>\n<pre>sudo yum install -y openssh-server<\/pre>\n<p><strong>Start ssh service<\/strong><\/p>\n<pre>sudo systemctl start sshd<\/pre>\n<p>By default the SSH service should start when the system starts, but if not try the following command to enable the service on boot up.<\/p>\n<p>Debian \/ Ubuntu<\/p>\n<pre>systemctl enable ssh<\/pre>\n<p>Fedora, CentOS, RedHat<\/p>\n<pre>systemctl enable sshd<\/pre>\n<p><strong>Change SSH port<\/strong><\/p>\n<p>Not necessary, but it is a good idea to change the default ssh port.\u00a0 To change the port edit the sshd file.<\/p>\n<pre>vi \/etc\/ssh\/sshd_config<\/pre>\n<p>If you change the port, you&#8217;ll need to allow it in the firewall (<a href=\"http:\/\/www.incredigeek.com\/home\/how-to-allow-a-port-through-firewalld\/\">firewalld<\/a>, <a href=\"http:\/\/www.incredigeek.com\/home\/how-to-open-a-port-on-redhat-centos-or-fedora-linux\/\">iptables<\/a>) and if SELinux is enabled, <a href=\"http:\/\/www.incredigeek.com\/home\/semanage-allow-and-delete-ports-in-centos\/\">semanage<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian \/ Ubuntu sudo apt-get install -y openssh-server RPM based Distros, Fedora \/ CentOS \/ RedHat sudo dnf install -y openssh-server or use yum sudo yum install -y openssh-server Start ssh service sudo systemctl start sshd By default the SSH &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/install-ssh-server-on-linux-debian-ubuntu-fedora-centos-redhat\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,4,264,24,3,22,28],"tags":[17,51,19,7,373,18,221,294,49],"class_list":["post-1730","post","type-post","status-publish","format-standard","hentry","category-centos-linux","category-command-line","category-debian","category-fedora-2","category-linux","category-redhat-linux","category-ubuntu","tag-centos","tag-debian","tag-fedora","tag-linux-2","tag-openssh","tag-redhat","tag-ssh","tag-sshd","tag-ubuntu-2"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=1730"}],"version-history":[{"count":7,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1730\/revisions"}],"predecessor-version":[{"id":1991,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1730\/revisions\/1991"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}