Using public/private key pair instead of password

  1. Open the /etc/ssh/sshd_config file.

    sudo nano /etc/ssh/sshd_config
  2. Set the PasswordAuthentication option to no.

    PasswordAuthentication no
  3. Restart the SSH server to apply changes.

    sudo systemctl restart sshd

Last updated