Closed injust closed 6 years ago
Thanks for the PR. I like the idea, but it could become problematic because the AuthorizedKeysFile
may take multiple arguments, one of which may be .ssh/authorized_keys
. Predictably handling all the edge cases, in addition to properly parsing the config and all of its edge cases, may be difficult; I would prefer to retain predictable behavior: the droplet's configured SSH key is always inserted into /root/.ssh/authorized_keys
.
If you want to nullify the key, you can comment it out in authorized_keys
with #
.
@gh2o I've modified the check to make sure it works with multiple instances of AuthorizedKeysFile
and also multiple arguments. Could you please take another look?
@Injust Thanks for the changes, but I'm curious: what problem are you solving with this PR?
It isn't a problem, so to speak, but I've relocated the authorized_keys file and would like to get rid of the .ssh directory if it isn't necessary anymore.
Closing for inactivity.
No need to write SSH public keys into the default location if the user has overridden the location in
/etc/sshd_config