SSH Setup

When you create a new user in linux, and you have to login as the new user say

ssh deploy@surajg.tech

To be able to do this, perform the following steps:

sudo apt update 
sudo apt install openssh-server
sudo nano /etc/ssh/sshd_config

Allow SSH Through Firewall

sudo ufw allow
ssh sudo ufw enable

Open /etc/ssh/sshd_config

PubkeyAuthentication yes 
AuthorizedKeysFile .ssh/authorized_keys
mkdir -p ~/.ssh
sudo nano ~/.ssh/authorized_keys
cat /usr/sbin/sshd -t