Installing SSH daemon (sshd)

nas

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.

Reading time:
1 min

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 with 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 incoming 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.

Thank you for reading this article.
Please share if you liked it.