Skip to content

Instantly share code, notes, and snippets.

@elight
Created December 17, 2013 19:23
Show Gist options
  • Save elight/8011025 to your computer and use it in GitHub Desktop.
Save elight/8011025 to your computer and use it in GitHub Desktop.
Fog::SSH.new(public_ip_address, username, credentials).run([
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
%{passwd -l #{username}},
%{echo "#{Fog::JSON.encode(attributes)}" >> ~/attributes.json},
%{echo "#{Fog::JSON.encode(metadata)}" >> ~/metadata.json}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment