1. Create your ssh key on your laptop -> ssh-keygen
  2. Create ~/.ssh/ folder on the server -> mkdir -p ~/.ssh/
  3. Make sure to do this on the server -> “echo public_key_string >> ~/.ssh/authorized_keys”
  4. Copy your pub key to ~/.ssh/authorized_keys on your server
  5. You need to little bit config to this on the server -> sudo nano /etc/ssh/sshd_config
  6. And enable on “PubkeyAuthentication yes” from “#PubkeyAuthentication yes”
  7. Restart the ssh on the server by “sudo systemctl restart ssh”
  8. The last one exit the server and “ssh user@host” again

Try to help to pangdev58@gmail.com

--

--