{"id":4020,"date":"2014-09-30T14:49:20","date_gmt":"2014-09-30T14:49:20","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=4020"},"modified":"2014-09-30T14:49:20","modified_gmt":"2014-09-30T14:49:20","slug":"enable-ssh-in-ubuntu-14-10-server-desktop","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2014\/09\/enable-ssh-in-ubuntu-14-10-server-desktop\/","title":{"rendered":"Enable SSH in Ubuntu 14.10 Server \/ Desktop"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/12\/ssh_logo-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/12\/ssh_logo-1.png\" alt=\"enable ssh ubuntu 14.10\" width=\"230\" height=\"230\" class=\"aligncenter size-full wp-image-2503\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/12\/ssh_logo-1.png 230w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/12\/ssh_logo-1-150x150.png 150w\" sizes=\"auto, (max-width: 230px) 100vw, 230px\" \/><\/a><\/p>\n<p>Secure Shell (SSH) is a protocol for securely accessing remote machine, it allows you to run command line and graphical programs, transfer files, and even create secure virtual private networks over the Internet.<\/p>\n<p>Ubuntu does not provide the ssh service out-of-the-box. But you can easily enable it by installing the OpenSSH server package.<\/p>\n<p><b>To enable SSH:<\/b><\/p>\n<p>Search for and install the <b>openssh-server<\/b> package from Ubuntu Software Center. Or run command below in console if you&#8217;re on Ubuntu Server without GUI:<\/p>\n<pre style=\"border:none;\">sudo apt-get install openssh-server<\/pre>\n<p>Once installed, the SSH service should be started automatically. If necessary, you can start (or stop, restart) the service manually via command:<\/p>\n<pre style=\"border:none;\">sudo service ssh start<\/pre>\n<p><b>To edit settings:<\/b><\/p>\n<p>To change the port, root login permission, you may edit the <b>\/etc\/ssh\/sshd_config<\/b> file via:<\/p>\n<pre style=\"border:none;\">sudo nano \/etc\/ssh\/sshd_config<\/pre>\n<p>After you changed the configurations, press <b>Ctrl+X<\/b> followed by typing <b>y<\/b> and hitting <b>enter<\/b> to save the file.<\/p>\n<p>Finally restart the SSH service to apply the changes:<\/p>\n<pre style=\"border:none;\">sudo service ssh restart<\/pre>\n<p><b>Usage and Tips:<\/b><\/p>\n<p>1. Normally, we can access remote machine through SSH via command:<\/p>\n<pre style=\"border:none;\">ssh username@remote-ip<\/pre>\n<p>For the port that is not the default 22: <\/p>\n<pre style=\"border:none;\">ssh username@remote-ip -p NUMBER<\/pre>\n<p>2. For desktop Ubuntu, <b>root<\/b> user need to be enabled first so that remote machines can SSH to it via root:<\/p>\n<p>Run command below to set a password for root:<\/p>\n<pre style=\"border:none;\">sudo passwd root<\/pre>\n<p>Then execute command to unlock the root account:<\/p>\n<pre style=\"border:none;\">sudo passwd -u root<\/pre>\n<p>Edit the config file <b>\/etc\/ssh\/sshd_config<\/b>, change the line<\/p>\n<blockquote><p>PermitRootLogin without-password<\/p><\/blockquote>\n<p>into:<\/p>\n<blockquote><p>PermitRootLogin yes<\/p><\/blockquote>\n<p>When done, restart the SSH service.<\/p>\n<p>For more, read the <a href=\"https:\/\/help.ubuntu.com\/community\/SSH\" target=\"_blank\">community documents<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Secure Shell (SSH) is a protocol for securely accessing remote machine, it allows you to run command line and graphical programs, transfer files, and even create secure virtual private networks over the Internet. Ubuntu does not provide the ssh service out-of-the-box. But you can easily enable it by installing the OpenSSH server package. To enable [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[24,1084],"class_list":["post-4020","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-ssh","tag-ubuntu-14-10"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/4020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=4020"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/4020\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=4020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=4020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=4020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}