Skip to content

Instantly share code, notes, and snippets.

@wudixiaotie
Last active November 1, 2016 09:10
Show Gist options
  • Save wudixiaotie/63bdca9c2b4631ebb34942b35a6ba4e9 to your computer and use it in GitHub Desktop.
Save wudixiaotie/63bdca9c2b4631ebb34942b35a6ba4e9 to your computer and use it in GitHub Desktop.
SmartOS vmadm create json file. The script run during vm initialization.
{
// ...
"customer_metadata": {
"root_authorized_keys": "ssh key",
"user-script": "rm -rf ~root/.ssh/authorized_keys; /usr/sbin/mdata-get root_authorized_keys > ~root/.ssh/authorized_keys;"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment