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

前端 未结 4 1177
死守一世寂寞
死守一世寂寞 2021-02-04 10:38

Keys are properly deployed in ~/.ssh/authorized_keys

Yet ssh keeps on prompting for a password.

4条回答
  •  你的背包
    2021-02-04 10:43

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

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

    chown -R : ~/.ssh
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/*
    restorecon -R -v ~/.ssh
    

提交回复
热议问题