redhatselinuxsshdoracle-enterprise-linux

RedHat 6/Oracle Linux 6 is not allowing key authentication via ssh


Keys are properly deployed in ~/.ssh/authorized_keys

Yet ssh keeps on prompting for a password.


Solution

  • Several issues, mostly privileges - but also related to SELinux on RedHat 6

    The following script should fix them all, please replace <user>:<group> with your matching userid and group

    chown -R <user>:<group> ~/.ssh
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/*
    restorecon -R -v ~/.ssh