Skip to content

Instantly share code, notes, and snippets.

@codification
Created April 2, 2012 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codification/2286943 to your computer and use it in GitHub Desktop.
Save codification/2286943 to your computer and use it in GitHub Desktop.
ssh key rejected on ec2 eu-west-1
(ns mail
(:use [pallet.utils :only [make-user]]
[pallet.crate.automated-admin-user :only [automated-admin-user]]
[pallet.phase :only [phase-fn]]
[pallet.core :only [server-spec group-spec converge]]
[pallet.compute :only [compute-service-from-config-file]]))
(def my-admin-user (make-user "superuser"
:public-key-path "/path/to/public"
:private-key-path "/path/to/private"))
(def svc (compute-service-from-config-file))
(defn with-admin [admin-user]
(server-spec
:phases {:bootstrap (phase-fn
(automated-admin-user (:username admin-user)
(:public-key-path admin-user)))}))
;; This group works fine
(defn converge-in-us-east []
(converge {(group-spec "berras"
:extends [(with-admin my-admin-user)]) 1}
:compute svc
:user my-admin-user))
;; In this group I cannot login using the ssh-keypair specified above
(defn converge-in-eu-west []
(converge {(group-spec "berras"
:extends [(with-admin my-admin-user)]
:location {:location-id "eu-west-1"}) 1}
:compute svc
:user my-admin-user))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment