Tip:
Highlight text to annotate it
X
so you got your ec2 instance you've dialed it up in the cloud
you've got your private key your pem file
and the hostname of the instance that you've set up
so now we're going to show you how to connect to that instance
from cygwin you launch cygwin as we've shown you before
you're going to double click on the cygwin icon
then you're going to type the following set of commands
so you're going to change the home directory you're going to cp cygdrive c users whatever
your username is over here downloads, your pem file
and notice that little period at the end it means copy to your local directory which
in this case in tilde, your home directory
so copy that to your local directory then you're going to type in this incantation
the first changes the group of the file to Users
the next changes the permissions to 400, which as before, is read only
and the third is the command that would actually ssh to the machine and
note that we put ubuntu @ before the hostname like we did on the mac.
i don't want to go too deep into what these exact commands are doing but i've
annotated this this is kinda like an example session over
here and i've annotated this but we can see the
group change initially this group is none
but after you do change group users, the group has changed to users
and initially these were the permissions but after you've chmod 400
the permissions changed the way we're listing all this stuff is ls
dash alrth ls is a command that does list, these are
options that give a more detailed listing
in general, if you want to learn more about what's going on here, you can
see unix permissions the main thing to keep in mind is if you just
try using the key right out of the box you're gonig to get something like
this unprotected private key file and all you need
to do is to change it back change it to something like this so that it's
only that you can read it and then windows will be happy
and then it will not give you an error like this
so you don't really need to understand what's going on just yet
just know that you need to do this incantation you can connect to the remote machine
and you know that if it does work you'll see something like this
welcome to ubuntu then you'll get a prompt
on ec2 and you can type in hostname and you'll get something that looks like this
so let's talk about the next step