Support mdata variable for /root/.ssh/authorized_keys file#1
Support mdata variable for /root/.ssh/authorized_keys file#1drscream wants to merge 1 commit intoTritonDataCenter:masterfrom
Conversation
This script creates a .ssh folder with minimal permissions, if the directory already exists the permissions will be changed to 700. If the mdata variable `root_authorized_keys` the `authorized_keys` is cleared and a header is added. I also fix the file permissions to be sure we're using the minimal permissions required for `authorized_keys`.
|
I don't know the mechanism SmartDataCenter uses, but @drscream did you investigate if that was appropriate here? If it isn't appropriate, could you explain why? If the approach already proposed here is preferred, would it make sense to use the same logic / code as https://github.com/joyent/smartos-vmtools/blob/master/src/linux/lib/smartdc/set-root-authorized-keys |
|
I'm sorry I don't know how it works in SDC but I will try to find out. I only noticed that it isn't working if you're using the The code you provided from the |
|
SDC uses SmartLogin, a service that runs in the global zone and communicates with UFDS. SmartLogin authenticates users against keys stored in UFDS without using an OS zones in SDC don't include the |
This script creates a .ssh folder with minimal permissions, if the directory already exists the permissions will be changed to 700. If the mdata variable
root_authorized_keystheauthorized_keysis cleared and a header is added. I also fix the file permissions to be sure we're using the minimal permissions required forauthorized_keys.