Enable key-based authentication in the /etc/ssh directory on the SSH server.
Ensure that the following lines exist in the sshd_config file:
# Should we allow Identity (SSH version 1) authentication?
RSAAuthentication yes
# Should we allow Pubkey (SSH version 2) authentication?
PubkeyAuthentication yes
# Where do we look for authorized public keys?
# If it doesn't start with a slash, then it is
# relative to the user's home directory
AuthorizedKeysFile .ssh/authorized_keys
Restart the SSH server. (sudo systemctl restart ssh https://askubuntu.com/questions/103889/how-do-i-restart-the-ssh-service)
Make sure the permissions on the ~/.ssh directory and its contents are proper. (user and group should only be u, and permission for .ssh should be 700, authorized_keys should be 600) https://unix.stackexchange.com/questions/36540/why-am-i-still-getting-a-password-prompt-with-ssh-with-public-key-authentication
No comments:
Post a Comment