1 00:00:00,030 --> 00:00:05,520 and welcome back to BackSpace Academy. In this lesson I'm going to run through 2 00:00:05,520 --> 00:00:11,490 what we previously did with connecting to ec2 windows and ec2 Linux instances 3 00:00:11,490 --> 00:00:18,029 but I'm going to do it using a Mac instead of using a Windows PC so if 4 00:00:18,029 --> 00:00:23,279 you're a Windows PC user you can skip over this lesson it's not for you. So now 5 00:00:23,279 --> 00:00:29,490 in the ec2 management console will launch an instance and we'll select the 6 00:00:29,490 --> 00:00:49,079 Amazon Linux AMI and a t2 Nano and we'll auto assign a public IP. We'll skip over 7 00:00:49,079 --> 00:00:55,170 that and we'll go to security group so we've got a security group there for SSH 8 00:00:55,170 --> 00:01:04,530 on port 22 which is fine for us so we just review and launch so I'm just going 9 00:01:04,530 --> 00:01:14,180 to create a new key pair here okay so now we'll just download that keep in and 10 00:01:14,180 --> 00:01:17,930 I'll launch that instance 11 00:01:26,780 --> 00:01:30,500 okay so that's currently pending and after a certain amount of time it will 12 00:01:30,500 --> 00:01:38,030 be up and running okay we can see there now that our ec2 instance is up and 13 00:01:38,030 --> 00:01:43,729 running so we just select that and then we'll click on connect. So the first 14 00:01:43,729 --> 00:01:48,440 thing we need to do is to change permissions on our pem. file that we 15 00:01:48,440 --> 00:01:52,369 downloaded previously when we created the ec2 instance and then once we've 16 00:01:52,369 --> 00:01:59,140 done that we can connect to our instance using the terminal using that endpoint 17 00:01:59,140 --> 00:02:14,800 So I'm just going to jump into the terminal and I'm just going to create a 18 00:02:14,800 --> 00:02:20,290 directory for putting this key pair into there 19 00:02:24,220 --> 00:02:31,790 Okay so just created that there now and so I'll just CD into that now 20 00:02:31,790 --> 00:02:37,130 I'll just jump back in and grab that file and I'll put it into that location 21 00:02:37,130 --> 00:02:41,080 So first of all I'll just get Finder up 22 00:02:42,910 --> 00:02:51,459 and there's the key pairs directory. Back into Chrome and grab that file 23 00:03:02,750 --> 00:03:06,590 I am going to copy that file over to the key pairs directory that I just 24 00:03:06,590 --> 00:03:21,470 created. Okay so that's that done. Okay so it's fine. So now it's just got to create 25 00:03:21,470 --> 00:03:26,209 or to do a command to change the permissions on that file. So I just jump 26 00:03:26,209 --> 00:03:31,780 back into here grab that command, save me typing it out 27 00:03:43,700 --> 00:03:48,240 just put your password in there and that's change the permissions on that 28 00:03:48,240 --> 00:03:55,800 for us. So now we've got that that key pair file located there and we're in 29 00:03:55,800 --> 00:04:01,020 that directory where our key pair is, so we can now look at connecting into our 30 00:04:01,020 --> 00:04:06,560 instance through the terminal. So I just jump back into Chrome just grab this and 31 00:04:06,560 --> 00:04:10,770 AWS made life a lot easier for us here so there's it's given us the actual 32 00:04:10,770 --> 00:04:19,830 command that we need to use in terminal. So we just copy that over and place that 33 00:04:19,830 --> 00:04:35,610 in and just typing is for that and there we go we eventually connect it into the 34 00:04:35,610 --> 00:04:45,150 Linux instance in and so we can do our sudo yum update if we want and there we 35 00:04:45,150 --> 00:04:54,360 go. So we've success successfully connected into our Linux instance using 36 00:04:54,360 --> 00:04:59,130 a Mac something new for me I'm not a Mac user so it was quite interesting to get 37 00:04:59,130 --> 00:05:04,440 to do this that life is a lot easier for Macs as compared to Windows. So this as 38 00:05:04,440 --> 00:05:08,040 you can see we just go straight into terminal there's no using putty or 39 00:05:08,040 --> 00:05:12,210 anything like that you just go straight in and and it's it's a lot easier it's 40 00:05:12,210 --> 00:05:18,420 very easy very similar to the process that you use with with Linux as well. So 41 00:05:18,420 --> 00:05:22,380 now that we've launched an ec2 instance we have connected into it with SSH and 42 00:05:22,380 --> 00:05:27,510 we've run some commands in the terminal from our Mac this will have a look now 43 00:05:27,510 --> 00:05:34,200 at using SFTP to transfer files from our Mac across to the EBS volume that is 44 00:05:34,200 --> 00:05:41,310 attached to our ec2 instance. So we use FileZilla the same as we would with 45 00:05:41,310 --> 00:05:45,630 Windows so just go to the FileZilla website and download and install 46 00:05:45,630 --> 00:05:53,240 FileZilla then once you've got it up and running just go to file site manager and 47 00:05:53,240 --> 00:05:58,330 then create a new site now our host will be the public IP 48 00:05:58,330 --> 00:06:04,180 address of our ec2 instance. So I'm just going to jump back into the browser 49 00:06:04,180 --> 00:06:10,930 and I can see here this is the public IP address of that ec2 instance that I want 50 00:06:10,930 --> 00:06:21,460 to connect to and we're going to connect on with port 22 for SSH and our protocol 51 00:06:21,460 --> 00:06:30,669 will be SSH File Transfer Protocol or SFTP and we're going to be logging on 52 00:06:30,669 --> 00:06:36,850 using our key file or our key pair so what we need to do is just browse for 53 00:06:36,850 --> 00:06:45,669 that key pair and we just download that and there it is now our our user because 54 00:06:45,669 --> 00:06:57,400 it is in an amazon linux ami you will be ec2 - user will be the user if it was 55 00:06:57,400 --> 00:07:04,360 an Ubuntu AMI, the user would be ubuntu. So we just connect into 56 00:07:04,360 --> 00:07:13,979 that now and just trust this host not a problem 57 00:07:17,130 --> 00:07:22,660 So just connect it in its retrieving the home directory of this and there we can 58 00:07:22,660 --> 00:07:27,010 see so we've got our our EBS volume that we're having a look at now so we've got 59 00:07:27,010 --> 00:07:34,090 our home directory then which is ec2 user and that looks all pretty good. So 60 00:07:34,090 --> 00:07:40,539 now we'll look at connecting to a Windows Server instance from the Mac so 61 00:07:40,539 --> 00:07:45,580 again let's launch an instance so this time we're going to look for a Windows 62 00:07:45,580 --> 00:07:51,190 Server standard edition, we don't want the data center edition, we're looking 63 00:07:51,190 --> 00:07:56,410 for a, so here we go, so Microsoft Windows 2012 Standard Edition is the one we're 64 00:07:56,410 --> 00:08:01,870 looking for. So we'll select that we'll select a nano 65 00:08:01,870 --> 00:08:04,650 instance for that 66 00:08:05,690 --> 00:08:11,690 and we'll go along and we'll make sure that there's a public IP enabled we 67 00:08:11,690 --> 00:08:16,760 don't need to add storage or tags but we need to configure a security group so 68 00:08:16,760 --> 00:08:20,900 obviously we need double three eight nine for RDP connection to a Windows 69 00:08:20,900 --> 00:08:27,890 Server instance. So that will be fine for us. So just review and launch and we'll 70 00:08:27,890 --> 00:08:41,450 use the same key pair that we used before and we'll just wait for that to 71 00:08:41,450 --> 00:08:47,900 boot up okay so our ec2 instance theory is up and running so let's just have a 72 00:08:47,900 --> 00:08:54,820 look at that so what we can do now is that we can get our Windows password and 73 00:08:54,820 --> 00:09:00,860 we do that by opening our keep part I'll keep here and then we get their 74 00:09:00,860 --> 00:09:06,710 contents into this box here so let's open that up so there's our PEM file 75 00:09:06,710 --> 00:09:14,650 that we downloaded previously and now we decrypt the password. So there's our 76 00:09:14,650 --> 00:09:19,220 endpoint for this server and this is our username as an administrator and our 77 00:09:19,220 --> 00:09:24,830 password there so we just need to go into an RDP client now on Mac the one 78 00:09:24,830 --> 00:09:30,050 that I've found seems to be quite reliable is called Cord. So just go to 79 00:09:30,050 --> 00:09:35,300 Google and typing cord RDP and you'll find the website for it. So just download 80 00:09:35,300 --> 00:09:39,050 that and install it. So once you've install it you'll you'll get a screen 81 00:09:39,050 --> 00:09:42,740 like this. So all you need to do is to just click on servers in this little 82 00:09:42,740 --> 00:09:46,940 slide will come out and just add the server information. So I'm just going to 83 00:09:46,940 --> 00:09:53,270 give it a name ec2 now the address will be the end point which you see them now 84 00:09:53,270 --> 00:09:59,470 public dns endpoint so just copy that and bring that over 85 00:10:01,070 --> 00:10:04,690 and our username and password 86 00:10:20,550 --> 00:10:24,879 okay I mean just say that task squared there so we need to do now just close 87 00:10:24,879 --> 00:10:28,420 out of that form and that should be all ready to go so we just double click on 88 00:10:28,420 --> 00:10:33,100 this instance that we've quite all this server that we've just created that will 89 00:10:33,100 --> 00:10:39,430 connect us straight in and there we go so it's connected and it will start to 90 00:10:39,430 --> 00:10:47,490 do its business and we should get a user interface for our Microsoft server 91 00:10:59,830 --> 00:11:04,180 okay so that you can see so we've connected in with we've got our user 92 00:11:04,180 --> 00:11:07,690 interface for our server and everything's fine so that brings us to 93 00:11:07,690 --> 00:11:13,000 the end of this lecture and I'll look forward to seeing you in the next ones