Brew

From openssh formula.

$ brew install openssh

Linux

Install OpenSSH

$ sudo apt-get install openssh-server openssh-client -y

Verify SSH service is running

$ sudo systemctl status ssh

If necessary:

$ sudo systemctl enable ssh
$ sudo systemctl start ssh

Configure

You may need to allow port 22 for SSH to work.

$ sudo ufw allow ssh
$ sudo ufw enable
$ sudo ufw status