[cs615asa] ssh configurations

Jan Schaumann jschauma at cs.stevens.edu
Sat Mar 26 17:22:30 EDT 2011


John Wierzchowski <jwierzch at stevens.edu> wrote:
 
> So just a quick clarification, we are assuming that the ssh config exists
> and is configured for all the instances right? so when we ssh we just need
> the address of the client not the key not root@ correct? or should we
> account for it not being configured? I started this whole mess of code with
> the assumption of no ssh config. I mean now that Im thinking about it i
> guess we can tell from the first ssh call...

You can assume that the user has his ~/.ssh/config set up to allow
connections to all amazon ec2 instances to work without any additional
options.  The following is really all that one needs to set:

Host *.amazonaws.com
        IdentityFile            ~/aws/aws-ec2.pem
        User                    root
        UserKnownHostsFile      /dev/null
        StrictHostKeyChecking   no

It'd probably be useful to allow the user to specify any additional
options via an environment variable, say EC2_SSH_OPTS, so that the user
can override any such options if so desired.

> also in this case when we create a new instance, we need to supply a key,
> should we go to ssh/config to get this key? or is it allright to make a key
> and store it in EC2_HOME?

The assignment specifies:
http://www.cs.stevens.edu/~jschauma/615A/ec2-start-instance.1.html#sect7

| ec2-start-instance allows the user to add custom flags to the
| ec2-run-instances(1) command via the EC2_RUN_INSTANCES_FLAGS environment
| variable. If this variable is not set, ec2-start-instance will not
| append any flags to the command besides -a ami. 

-Jan


More information about the cs615asa mailing list