ssh远程执行命令时报错Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

遇到的问题:

通过ssh远程执行命令时,报下面的错误:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
 

解决步骤如下:

1、chmod 600/etc/ssh/sshd_config
 
2、vi /etc/ssh/sshd_config
 
将下面配置的注释放开:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
 
3、vi authorized_keys
追加了本机的id_rsa.pub内容
id_rsa.pub目录:~/.ssh/id_rsa.pub
 
原文地址:https://www.cnblogs.com/meitian/p/13458902.html