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

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

    I'd agree with the changes above working on most linux variants in the root account. I have had a problem with RedHat 6.3 with trying to get a postgres user account to use DSA auth. (6.3 running in VirtualBox)

    The issue can be that the basic selinux permissions are wrong. Restorecon wont help in this case.

    (After restorecon)
    drwx------. postgres postgres unconfined_u:object_r:var_lib_t:s0 .ssh
    

    I have fixed this with :

    chcon -R -t ssh_home_t .ssh
    

    This resolved this instance of the problem.

提交回复
热议问题