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

前端 未结 4 1069
死守一世寂寞
死守一世寂寞 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:41

    The above answer is quite good, I have an addition & a suggestion. The addition is in line 2 below, as home directory permissions not be more permissive than rwxr-x--- for ssh key authentication.

    cd ~
    chmod g-w,o-rwx .
    chmod 700 .ssh
    cd .ssh
    chmod 600 *
    chmod 644 authorized_keys
    chmod 644 known_hosts
    chmod 644 config
    restorecon -R -v ../.ssh
    

    The suggestion is to make use of the -vv option when testing.

提交回复
热议问题