selinue引起的ssh连接错误

在客户端执行ssh依然报错:
Shell代码  收藏代码
  1. Permission denied (publickey,gssapi-keyex,gssapi-with-mic).  


在这个页面不小心看到了原因:
http://serverfault.com/questions/230771/ssh-configuration-publickeys-permission-denied-publickey-password-error
又是TM的SELinux惹的祸,关闭SELinux解决问题:
暂时关闭(重启后恢复):
Shell代码  收藏代码
  1. setenforce 0  

永久关闭(需要重启):
Shell代码  收藏代码
  1. vi /etc/selinux/config  
  2. SELINUX=disabled 
原文地址:https://www.cnblogs.com/lykops/p/7348032.html