# Create .ssh directory
mkdir -p ~/.ssh
# Replace `public_key_string` to your public key
echo public_key_string >> ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
sudo nano /etc/ssh/sshd_config
Press ctrl+w to seach
PasswordAuthentication
sudo systemctl restart ssh