Installing SSH Daemon (sshd)

OpenSSH is at the top of the pile of utilities you can use for encrypted data transfer. Here, we'll cover how to install the server side daemon.

OpenSSH Daemon

OpenSSH Daemon, or sshd is the server side of ssh secure communications. It listens out for incoming connections from ssh clients and spawns a process to handle them. You can install sshd either directly using apt-get, or via tasksel (a handy graphical software installation interface).

Installation Using Tasksel

Ubuntu server comes with tasksel installed by default, the desktop version does not. If you need to install tasksel, just run:

sudo apt-get install tasksel
To use tasksel to install sshd, follow these steps:

  1. Start tasksel:

    sudo tasksel
  2. Navigate the cursor to OpenSSH server, then hit the space key to select it.

  3. Hit the return key

Installation Using apt-get

To install sshd using apt-get, run:

sudo apt-get install openssh-server

Configuring Firewall

If you have a firewall enabled (and you really should!), you'll need to ensure it is allowing ssh traffic through. By default sshd listens for incomming connections on port 22 (If you've changed this port number use the new number below). To allow traffic to reach this port, run:

sudo ufw allow 22
Now you'll be able to ssh to the box from another box.