Permalink
Browse files

a script to take a base amazon AMI and enable root@ ssh

  • Loading branch information...
1 parent 782907f commit c849643778222b6cf410f18424aaa2e033a47562 @lloyd lloyd committed Feb 10, 2014
Showing with 8 additions and 1 deletion.
  1. +1 −1 lib/vm.js
  2. +7 −0 scripts/enable_root.sh
View
@@ -279,7 +279,7 @@ exports.waitForInstance = function(id, cb) {
// find the instanceStatusSet
var status = jsel.match('.instanceStatusSet', r)[0];
if ( status === '' ) {
- process.stdout.write(tries <= 1 ? " ..." : ".");
+ console.log(' ... not yet created');
return setTimeout(function(){ exports.waitForInstance(id, cb); }, CREAT_POLL);
}
View
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# execute this on a new AWS images to allow ssh access via the root user
+
+sudo sed -i s/^#PermitRoot/PermitRoot/ /etc/ssh/sshd_config
+sudo /etc/init.d/sshd restart
+sudo sed -i s/^.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys

0 comments on commit c849643

Please sign in to comment.