# Ubuntu: Setup SSH Server

Here are steps to setup the SSH server on an Ubuntu host.

Here's a good reference article for how to do what we're doing here: <span data-annotation-inline-node="true" data-annotation-mark="true" data-card-url="https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-20-04/" data-inline-card="true" data-renderer-start-pos="98"><span class="loader-wrapper"><span data-testid="hover-card-trigger-wrapper">[<span class="css-1cwva94 e1o1fuf52" data-testid="inline-card-icon-and-title"><span class="smart-link-title-wrapper css-0 e1o1fuf57">How to Enable SSH on Ubuntu 20.04</span></span>](https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-20-04/)</span></span></span>

Here are the commands to execute:

```bash
sudo apt update
```

Install the SSH server with this:

```bash
sudo apt install openssh-server
```

Start the SSH server:

```bash
sudo systemctl enable --now ssh
```

Verify it is running:

```bash
sudo systemctl status ssh
```

Add a firewall rule for the SSH server:

```bash
sudo ufw allow ssh
```