ssh_auth hard dependency on homedir
ssh_auth.present gives an error when a user's homedir does not exist, even if the keys are not being saved anywhere in the homedir. The error I get is: "Failed to add the ssh key. Is the home directory available, and/or does the key file exist?"
In my scenario, ssh keys are in /etc/ssh/keys/$USER. The home directory is indeed missing, but I don't see why it should be a requirement in this case.
Tested with version 2014.1.4.
Thanks for the report. Should be an easy fix.
Ah, I see the problem. From the docs:
config
The location of the authorized keys file relative to the user's home
directory, defaults to ".ssh/authorized_keys".
Note the "relative to the user's home directory". I'm going to add functionality such that if that path is an absolute path, it will use it as an absolute path.
This one bites me as well. We do not allow users to keep keys in their home directory. We use the AuthorizedKeysFile directive in /etc/ssh/sshd_config:
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
Closing as fixed by the above PR. If the problem still exists, feel free to reopen or create a new issue.