前提: 
1.客户端生成了id_rsa.pub和id_rsa 
2.服务端在.ssh/authorized_keys也加入了客户端的id_res.pub 
3./etc/ssh/sshd_config开启了:

  1. RSAAuthentication yes  
  2. PubkeyAuthentication yes  
  3. AuthorizedKeysFile     .ssh/authorized_keys

但在客户端执行ssh依然报错:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

 

最后在网上折腾了半天才发现原来是SELinux的问题,只要关闭SELinux在重新启动就可以了: 
暂时关闭(重启后恢复): 

setenforce 0  

  

相关文章:

  • 2021-07-19
  • 2021-05-18
  • 2021-07-09
  • 2021-07-04
  • 2021-04-11
  • 2022-02-22
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2021-10-05
  • 2022-02-27
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
相关资源
相似解决方案