For When You Can't Have The Real Thing
[ start | index | login ]
start > CentOS > 6 > ssh > SElinux SSH Pubkey Bug

SElinux SSH Pubkey Bug

Created by dave. Last edited by dave, 6 years and 124 days ago. Viewed 1,747 times. #1
[edit] [rdf]
(14 February 2013)


CentOS 6 is not accepting pubkey login attempts.


SElinux has a bug which rejects the credentials when it is set to Enforcing mode.

To fix, either

  • disable SElinux; or
  • apply the correct SElinux context as follows:
[root@node01 ~]# ssh root@node02 'restorecon -R -v /root/.ssh'
restorecon reset /root/.ssh context system_u:object_r:ssh_home_t:s0->system_u:object_r:home_ssh_t:s0
restorecon reset /root/.ssh/authorized_keys context unconfined_u:object_r:ssh_home_t:s0->system_u:object_r:home_ssh_t:s0


no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt