Skip to content

Instantly share code, notes, and snippets.

@Miserlou
Created June 24, 2012 00:54
Show Gist options
  • Save Miserlou/2980807 to your computer and use it in GitHub Desktop.
Save Miserlou/2980807 to your computer and use it in GitHub Desktop.
Multiline Javascript
var publicKey = our_data.servers['servername.com'].publicKey.join('\n');
@maksemuz
Copy link

maksemuz commented Dec 12, 2016

Hi, your line does not work for me, but leads me the right way :)
This corrected line works perfectly:

var publicKey = our_data.servers['servername.com'].publicKey.join("\n");

My case is lot of keys in one .ssh/authorized_keys file in one chef data_bag.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment