Skip to content

Instantly share code, notes, and snippets.

@bahamat
Created October 27, 2020 17:25
Show Gist options
  • Save bahamat/1ecd47361fa077be0a0d21abf4872ecb to your computer and use it in GitHub Desktop.
Save bahamat/1ecd47361fa077be0a0d21abf4872ecb to your computer and use it in GitHub Desktop.
Configure Triton CNs to use the same ssh keys as the headnode.
#!/bin/bash -x
node_config=/usbkey/extra/joysetup/node.config
if ! grep -q root_authorized_keys_file "$node_config" ; then
echo "root_authorized_keys_file='root.authorized_keys'" >> "$node_config"
fi
sdc-oneachnode -X -c -g /usbkey/config.inc/root.authorized_keys -d /opt/smartdc/config/
sdc-oneachnode -c 'svcadm restart smartdc/config'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment