Print
Category: YouTube
Hits: 3166
(13/14)
Between

Hey guys, let's go over some SFTP.

So,first what is SSTP? Well first before we answer that question, let's ask asimilar but different question, what is FTP? FTP is an acronym for the term filetransfer protocol and it uses the port 21, and basically what it does is ittransfers files between two machines.

So, SFTP, because in regular FTPeverything is transferred in clear text, so if anybody is sniffing packets onyour network like we learned in a previous video, they would be able toread all those packets, basically.

So, we're not going to use FTP, I actuallyrecommend never use FTP.

SFTP is just easier anyway, and so we're just goingto use SFTP.

So, similarly to the "ssh" command, you're gonna write"sftp" and then the connection string.

So, in my case it's exactly the same asbefore.

Then it asks for my password for the remote host, so I'm gonna put that in here, and now Ican list what's on the remote host by typing "ls" but we also have afew different commands to list what's on the local host.

I'm actually gonna exithere.

I'm going to make a directory called "sftp-demo" I'm going tochange into sftp-demo, and I'm going to "touch" a file called "names.

Txt.

" Now, I'mgoing to reconnect while in this directory, to my server.

Now, if I run "ls" I get theremote directories current directory listing, if I type "lls" I get the locallisting of the directory that I'm in on the local host.

And so here we canactually, we can grab files and transfer them to and from both machines.

So, if Iwanted to put names.

Text on to the server in the current directory, what Iwould do is type "put names.

Txt" and it's going to upload it to my remotehost with the same name.

So, that's when you would use "put" if you want to push afile from from your local machine to the remote host.

Similarly, use the command"get" to get files.

So, I'm going to, I really don't recall any of these files,I'm just gonna get the composer.

Json file.

So, I'm going to type "get composer.

Json" and if I run "lls" on my local machine I can now see that I have that filethere.

So, if I exit and then run "ls" I've got that file there.

So, that is how youwould use SFTP to transfer files to and from machines, and also a few commandsthere that can help you see what files are available.

So, thank you guys so muchfor watching, and I will see you guys again soon.