I have two nodes (master and slave) where the home directory of the master is shared via NFS with the slave node. I have created an ssh key and used 'ssh-copy-id' to add the public key to 'authorized_keys'.

The passwordless ssh works from the slave to the master, but not from the master to slave as I get "agent admitted failure to signing using key".

I think it may be an issue with file permissions but it is tricky since ~/.ssh folder is shared using NFS. Any ideas?


Did you generate the key in master or slave? Try this on both master and slave:

chmod go-w $HOME $HOME/.ssh
sudo chmod 600 $HOME/.ssh/authorized_keys
sudo chown 'username' $HOME/.ssh/authorized_keys

"username" is the name of the user you need to enable ssh.

Try this if the above method fails:

ssh-copy-id -i ~/.ssh/id_rsa.pub USERNAME@HOSTNAME.local

Enter this command from slave.

  • Thanks for the reply, but that didn't help. I have noticed something weird, the first ssh attempt I get the "agent admitted failure" error, however ssh works after subsequent ssh. I am creating the key from in the master – Jeanno Feb 14 '14 at 13:03

If you have SELinux enabled, you may have to enable NFS mounted home directories via:

setsebool -P use_nfs_home_dirs=true

I had this problem on RHEL, and found the solution in /var/log/messages:

SELinux is preventing /usr/sbin/sshd from read access on the file authorized_keys.#012#012***** Plugin catchall_boolean (89.3 confidence) suggests
******************#012#012If you want to allow use to nfs home dirs#012Then you must tell SELinux about this by enabling the 'use_nfs_home_dirs' boolean.#012You can read 'None' man page for more details.#012Do#012setsebool -P use_nfs_home_dirs 1#012#012*****

  • I don't know if this is THE right answer, but it is pretty darned good advice in general. 1. Suspect SELINUX when anything soes not work as expected 2) Read /var/log/messages. I learned from this one +1 – pauljohn32 Sep 28 '16 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.