1 00:00:08,644 --> 00:00:12,853 Hi, in today's lecture, we're gonna talk about SFTP which stands for 2 00:00:12,853 --> 00:00:15,300 Secure File Transfer Protocol. 3 00:00:15,300 --> 00:00:17,390 What this is, it's a fast way for 4 00:00:17,390 --> 00:00:19,990 your to move your files that you've been creating out onto the web. 5 00:00:22,120 --> 00:00:26,040 So, secure file transfer is just really a common way of moving files from your 6 00:00:26,040 --> 00:00:29,810 computer off to either someone else's computer, off to your server, or 7 00:00:29,810 --> 00:00:32,540 even up to some other computer that's within your business. 8 00:00:32,540 --> 00:00:36,970 People use the terms FTP and SFTP interchangeably. 9 00:00:36,970 --> 00:00:40,320 What's important for you to know is that the S stands for secure. 10 00:00:40,320 --> 00:00:44,748 So a lot of times, people are going to require that you use the SFTP protocol, 11 00:00:44,748 --> 00:00:46,464 instead of the FTP protocol. 12 00:00:46,464 --> 00:00:50,416 So when I say the word protocol, hopefully in your mind that's causing a little bit 13 00:00:50,416 --> 00:00:54,256 of a flashback into our early lectures when we talked about how browsers interact 14 00:00:54,256 --> 00:00:56,022 with the files that are sent to them. 15 00:00:56,022 --> 00:00:59,476 So with HTTP or HTTPS, your browser knows, oh, 16 00:00:59,476 --> 00:01:02,780 here's a file that she wants me to display. 17 00:01:02,780 --> 00:01:06,490 I should ignore all the tags and go ahead and put up a nice site for them. 18 00:01:06,490 --> 00:01:09,420 In the same way, you may have seen that there is a file protocol, 19 00:01:09,420 --> 00:01:12,750 which works pretty much the same way and says they've been making a web page, 20 00:01:12,750 --> 00:01:16,190 and it has been existing on their computer. 21 00:01:16,190 --> 00:01:21,590 With FTP or SFTP, what is going on is the browser is being told don't display these 22 00:01:21,590 --> 00:01:25,080 files, we actually want you to transfer them from one computer to another. 23 00:01:26,410 --> 00:01:31,410 What's also really nice about most FTP/SFTP software programs is that 24 00:01:31,410 --> 00:01:35,660 they let you drag and drop the files instead of uploading them one at a time. 25 00:01:36,690 --> 00:01:39,590 So, let's say that you're ready to go ahead and do secure file transfer. 26 00:01:39,590 --> 00:01:42,650 There's a few things that you're going to need. 27 00:01:42,650 --> 00:01:46,170 The first is your going to need what we call FTP client. 28 00:01:46,170 --> 00:01:50,280 What this is, is a software the you will use to connect different machines. 29 00:01:50,280 --> 00:01:53,500 If you're using a PC a common software program is WinSCP. 30 00:01:54,890 --> 00:01:58,810 If you're using a Mac many people use Fugu or Cyberduck. 31 00:01:58,810 --> 00:02:01,065 No matter which one of this three programs you wanna use, 32 00:02:01,065 --> 00:02:02,560 they're all free for download. 33 00:02:04,500 --> 00:02:08,910 Once you have your client, you need to go back and find out what the FTP address for 34 00:02:08,910 --> 00:02:10,300 your host is. 35 00:02:10,300 --> 00:02:14,040 When you signed up for a hosting service, they probably sent you an email that was 36 00:02:14,040 --> 00:02:16,700 full of information that you didn't really understand. 37 00:02:16,700 --> 00:02:19,650 It's time for you to finally dive into that email and 38 00:02:19,650 --> 00:02:21,220 start using the information. 39 00:02:21,220 --> 00:02:22,759 So let's go ahead and do it together. 40 00:02:23,890 --> 00:02:28,120 So here's an email that my hosting service sent to me with all the information I 41 00:02:28,120 --> 00:02:30,840 was going to need to connect to my site. 42 00:02:30,840 --> 00:02:35,070 Now if you look I have different things such as my account details and 43 00:02:35,070 --> 00:02:37,950 the site administration that tells me how I can connect if 44 00:02:37,950 --> 00:02:40,375 I was going to use something called zpanel. 45 00:02:40,375 --> 00:02:46,050 But since I'm using FTP, or in my case SFTP, what I need to know is the address, 46 00:02:46,050 --> 00:02:49,850 the port, and then there's also my username and my password. 47 00:02:49,850 --> 00:02:53,710 In many cases they don't specify a port, but my particular hosting service did. 48 00:02:53,710 --> 00:02:57,430 So let's go ahead and copy this, and 49 00:02:57,430 --> 00:03:02,159 I'm gonna log on with Cyberduck. 50 00:03:02,159 --> 00:03:06,168 [NOISE] Now, as may of you bring up Cyberduck some of you may end 51 00:03:06,168 --> 00:03:11,053 up having a picture very similar or a little graphic very similar to mine. 52 00:03:11,053 --> 00:03:14,860 If nothing showed up what I want you to do is go up to the top, and 53 00:03:14,860 --> 00:03:20,220 you should have a file and this is true if you're using WINSCP or Fugu instead. 54 00:03:20,220 --> 00:03:23,360 And you're gonna wanna go to open connection, and 55 00:03:23,360 --> 00:03:24,270 that's what brought me up here. 56 00:03:24,270 --> 00:03:27,400 So when I click on open connection, one 57 00:03:27,400 --> 00:03:31,660 of the first things you need to decide is whether you're gonna be using FTP or SFTP. 58 00:03:34,540 --> 00:03:35,830 Next, you need to put in your server. 59 00:03:37,870 --> 00:03:39,190 And if you need to, your port. 60 00:03:40,970 --> 00:03:43,210 Finally, go ahead and put in your user name and password. 61 00:03:51,190 --> 00:03:53,090 Hopefully, you've remembered all that information and 62 00:03:53,090 --> 00:03:55,010 the connections going to pop up for you. 63 00:03:55,010 --> 00:03:58,290 Don't be surprised of you forgot once or twice what that connection is, and 64 00:03:58,290 --> 00:04:00,120 if it pops up a warning. 65 00:04:00,120 --> 00:04:02,390 All right, once your window pops up, 66 00:04:02,390 --> 00:04:04,890 you're going to see that you have a few different folders. 67 00:04:04,890 --> 00:04:08,060 These different folders contain different information that your 68 00:04:08,060 --> 00:04:10,980 hosting service may or may not want to be shared. 69 00:04:10,980 --> 00:04:15,340 So for instance, think about any web site that you go to such as Facebook, Amazon. 70 00:04:15,340 --> 00:04:19,900 What's going on is that there are a lot of files going into building these sites, but 71 00:04:19,900 --> 00:04:21,730 they only want you see some of them. 72 00:04:21,730 --> 00:04:23,560 And those files that they want you to see, 73 00:04:23,560 --> 00:04:26,070 they need to reside in the public HTML folder. 74 00:04:26,070 --> 00:04:30,000 So when I go in here, what I want to just warn you about, is that when I click on 75 00:04:30,000 --> 00:04:34,060 the public HTML folder and you click on it, it's going to look very different. 76 00:04:34,060 --> 00:04:38,120 The reason for that is that I've already uploaded a lot of files, and for you it's 77 00:04:38,120 --> 00:04:42,350 most likely that the only file that's in there is something called cgi bin. 78 00:04:42,350 --> 00:04:44,800 And you wanna just pretty much leave that one alone. 79 00:04:44,800 --> 00:04:47,290 Now, what you wanna do next is start dragging and 80 00:04:47,290 --> 00:04:49,220 dropping some of the files that you wanna see. 81 00:04:49,220 --> 00:04:52,630 So let's go ahead and look at a site that I can use as an example. 82 00:04:52,630 --> 00:04:57,440 I'm gonna go ahead and bring this, open. 83 00:04:57,440 --> 00:04:59,630 And it's just a little site I have about Ashtabula. 84 00:04:59,630 --> 00:05:01,890 It's got a picture, and a couple maps on it. 85 00:05:01,890 --> 00:05:10,950 And if I go to the intro website, you can see that it doesn't exist there. 86 00:05:10,950 --> 00:05:14,220 There's nothing there, we get a 404, which means hey, you asked for this file and 87 00:05:14,220 --> 00:05:15,120 it doesn't exist. 88 00:05:15,120 --> 00:05:17,950 So let's go ahead and move those files over using cyberdock. 89 00:05:20,410 --> 00:05:23,440 So I'm going, all the code I wanna upload is over here. 90 00:05:23,440 --> 00:05:25,700 It's in a folder called Ashtabula. 91 00:05:25,700 --> 00:05:30,130 With many other services, I would need to go in and upload each file one by one. 92 00:05:30,130 --> 00:05:35,460 But instead, I'm gonna drag this entire folder over and drop it in. 93 00:05:35,460 --> 00:05:38,080 By the way, when you're dropping in, make sure you're dropping it in, 94 00:05:38,080 --> 00:05:41,480 right in the public HTML, not in a sub-folder if you have one. 95 00:05:41,480 --> 00:05:42,950 Not in the cgi-bin. 96 00:05:42,950 --> 00:05:43,490 Great. 97 00:05:43,490 --> 00:05:44,510 So there's Ashtabula. 98 00:05:44,510 --> 00:05:50,720 Let's try reloading my folder, and you can see that I come very close to success. 99 00:05:50,720 --> 00:05:54,470 I've got the two maps ,but the top picture is missing. 100 00:05:54,470 --> 00:05:56,870 Instead, all we see is the alt text. 101 00:05:56,870 --> 00:05:59,730 It's basically saying I can't find that picture. 102 00:05:59,730 --> 00:06:02,820 So let's a take a look and see what it's supposed to be looking at. 103 00:06:02,820 --> 00:06:04,740 I'm going to go to right click. 104 00:06:04,740 --> 00:06:05,590 Inspect element. 105 00:06:06,750 --> 00:06:10,470 And you can see it says, hey I can not find this picture down here. 106 00:06:10,470 --> 00:06:15,030 You're asking me to upload something called harborJTwide.jpg I don't 107 00:06:15,030 --> 00:06:16,770 know what that is. 108 00:06:16,770 --> 00:06:17,966 Alright, let's check out Cyberduck. 109 00:06:17,966 --> 00:06:22,430 Here's attribute, here's images. 110 00:06:22,430 --> 00:06:25,520 You can see, oh, but the picture's right there. 111 00:06:25,520 --> 00:06:30,360 But if you look really closely, you can see I used lowercase h over here and 112 00:06:30,360 --> 00:06:32,170 an uppercase H over here. 113 00:06:32,170 --> 00:06:33,870 I need to change the code. 114 00:06:33,870 --> 00:06:35,130 There are two ways you can do that. 115 00:06:35,130 --> 00:06:39,550 You can either edit it right within here, or you can change it on your computer and 116 00:06:39,550 --> 00:06:40,810 drag it up again. 117 00:06:40,810 --> 00:06:42,180 Let's go ahead and just edit it right here. 118 00:06:44,890 --> 00:06:46,380 Oops. 119 00:06:46,380 --> 00:06:49,350 Actually, let's not because that's a picture. 120 00:06:49,350 --> 00:06:52,000 What I really wanna edit, is the html file. 121 00:06:53,150 --> 00:06:54,350 I'm glad I made that mistake. 122 00:06:54,350 --> 00:06:56,500 It keeps you from making it yourself. 123 00:06:56,500 --> 00:07:00,140 So I'm gonna change this lowercase h to an uppercase H, 124 00:07:01,470 --> 00:07:04,010 save it, and let's try reloading. 125 00:07:06,680 --> 00:07:07,290 Success. 126 00:07:07,290 --> 00:07:09,860 We've got the file just as we wanted it. 127 00:07:09,860 --> 00:07:13,120 Now anytime you change a file, you're going to have to remember 128 00:07:13,120 --> 00:07:16,910 that any changes you make you need to drag and drop back up. 129 00:07:16,910 --> 00:07:19,040 That's one of the main reasons people have trouble with FTP, 130 00:07:19,040 --> 00:07:22,290 is that they forget what they uploaded and what they haven't. 131 00:07:22,290 --> 00:07:24,030 That's why I really like the ability to upload and 132 00:07:24,030 --> 00:07:27,299 entire file over one at a time as well as individual files. 133 00:07:28,560 --> 00:07:30,400 Let's go ahead and review a little bit. 134 00:07:30,400 --> 00:07:34,850 You can upload your files many ways, you can use C-Panel, you can use Fugu, 135 00:07:34,850 --> 00:07:37,160 you can use Cyberduck, you can use WinSP. 136 00:07:37,160 --> 00:07:40,770 There isn't a single right way to do it, but the most important thing is, 137 00:07:40,770 --> 00:07:44,040 before you can go ahead and use any of these software tools, it is important for 138 00:07:44,040 --> 00:07:45,910 you to know your login information. 139 00:07:45,910 --> 00:07:48,400 So, hold on to that e-mail when your hosting service sends it to you, 140 00:07:48,400 --> 00:07:50,080 you will be really glad you did. 141 00:07:50,080 --> 00:07:50,580 Good luck,