SSH公钥认证Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).的问题

SSH对公钥、私钥的权限和所有权的要求是非常严格的,总结如下:
1、下面两个目录的所有权必须是user,所属组也应该是user,前者权限不能是777,后者权限必须为700
\home\user
\home\user\.ssh
2、下面公钥文件的所有权必须是user,所属组也应该是user,权限必须为644
\home\user\.ssh\authorized_keys
3、下面私钥文件的所有权必须是user,所属组也应该是user,权限必须是600
\home\user\.ssh\id_rsa

有些用户將home目录权限设为777,提交并行任务出现下列错误:

Permission denied, please try again.^M
Permission denied, please try again.^M
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).^M
————————————————————————–
A daemon (pid 19715) died unexpectedly with status 255 while attempting
to launch so we are aborting.

There may be more information reported by the environment (see above).

This may be because the daemon was unable to find all the needed shared
libraries on the remote node. You may set your LD_LIBRARY_PATH to have the
location of the shared libraries on the remote nodes and this will
automatically be forwarded to the remote nodes.
————————————————————————–
————————————————————————–
mpirun noticed that the job aborted, but has no info as to the process
that caused that situation.

 

修改home目录权限,以及.ssh文件目录,解决!