<div dir="ltr">Ok, that makes sense. <div><br></div><div>Like the last assignment, for creating an ec2 instance, should we assume a default aws key name of &#39;ec2-backup&#39;?</div><div><br></div><div>-Justin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 2, 2019 at 3:11 PM Jan Schaumann &lt;<a href="mailto:jschauma@stevens.edu">jschauma@stevens.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Justin Barish &lt;<a href="mailto:jbarish@stevens.edu" target="_blank">jbarish@stevens.edu</a>&gt; wrote:<br>
&gt; If the user in the EC2_BACKUP_FLAGS_SSH changes their ssh key<br>
&gt; to something different, would they also change the --key-name in<br>
&gt; EC2_BACKUP_FLAGS_AWS to match, or would we have to manually do that?<br>
&gt; <br>
&gt; (And regardless, if they give a key-name in EC2_BACKUP_FLAGS_AWS<br>
&gt; that doesn&#39;t match the one in EC2_BACKUP_FLAGS_SSH,<br>
&gt; should we throw an error, or ignore their provided --key-name)<br>
<br>
You cannot make assumptions about the names of the keys.  There is no<br>
requirement that a key named &quot;bob&quot; in AWS matches a file named &quot;bob&quot; on<br>
the local system.  I can create a key pair and have the key in AWS be<br>
identified as &quot;fritz&quot; and save the private key on my local system as<br>
&quot;bob&quot;; what&#39;s more, I can later choose to rename the file to &quot;jenny&quot;.<br>
<br>
Fortunately for you, this simplifies things rather than making things<br>
more complicated: you don&#39;t need to try to &quot;verify&quot; if keys used for SSH<br>
match the ones used for AWS.  You will use whatever the user provides.<br>
If that works, great; if not, produce (or bubble up) a meaningful<br>
error to the user.  But in the face of ambiguity, resist the temptation<br>
to guess: tell the user that e.g., ssh didn&#39;t work, but don&#39;t try to<br>
speculate &quot;you provided a key that doesn&#39;t match the key in AWS&quot;,<br>
because you don&#39;t know if that is the case or not.<br>
<br>
-Jan<br>
_______________________________________________<br>
cs615asa mailing list<br>
<a href="mailto:cs615asa@lists.stevens.edu" target="_blank">cs615asa@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs615asa" rel="noreferrer" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs615asa</a><br>
</blockquote></div>