How to Transfer Files Using SSH

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're gonna transfer files using SSH now I've done some other SSH videos out there so if you're unfamiliar with SSH and just how to get around I had to recommend checking those out and also I'll leave a link to the ultimate SSH guide whether it's setup transferring and all that down in the description I create an article just as a good reference so you can bookmark that check that out as far as the setup getting around in transferring but all that'll be in the description but in this video we're talking about strictly transferring files using SSH so with all that let's not talk too much let's get right into actually the transferring and we're gonna go over both windows and also linux check the description for timestamps if you want to skip directly to Linux or Windows portion of this video just click on that so with all that said this video is sponsored by CDN 77 a content delivery network chosen by the European Space Agency and CentOS they have over a 14 terabytes per second global network real time technical support and a hundred percent transparent pricing and that is just a few reasons why Hubble images are delivered around the earth using CDN 77 okay so starting off here on our arch linux based system if you're on a debian based system or on gnome most these steps are pretty much the same all I'll show you kind of as we explore it how we're gonna browse so now I'm using the Dolphin Browser but I'm gonna show you dolphin and I believe I also have a nautilus on here for those known people out there so this is the two types of browsers and I'm just gonna show you how to basically use SSH to transfer files so I have a machine that I have for Minecraft and I want to transfer some files around in there so let's get into actually connecting so in Dolphin it's same thing you just go up to the the location bar or address bar and go SFTP P or s FTP and then we're just gonna put our username after a forward slash forward slash input administrator and then we're gonna put the IP of the machine it'll prompt for a password and then we enter our password and hit OK and then it'll bring us into our home directory on this machine now the cool thing is you can browse this whole machine so I know opt minecraft is where most of those files reside and I can come in here and change things around as I'm that user so this is as if I'm in there on SSH but if I need to drag and drop files into here I can totally do that with dolphin now the same thing can be done in Nautilus so most people don't have their Nautilus set up this way if you don't I highly recommend doing it because I don't like the the other way where you don't have the actual full thing but everyone has this other locations down here and you can simply just do it through here as well SFTP colon forward slash forward slash and then one 92168 69.6 be sure to put the username at that and when you connect you simply put that in and voila you are there so this is both file systems almost works identically that should cover probably 90% of full Linux file systems out there I'm sure Nemo and some of the more obscure file managers can easily do this as well so that covers the GUI portion of it just logging in it's as simple as SFTP now when I say SSH there's really two types of protocols I want to talk about there's SFTP which is what I just showed it's more of an interactive back-and-forth if you will if you interrupt a transfer you can resume the transfer this is also just a hair slower than what's called SCP both use SSH port 22 by default and there are actually a little bit faster on SCP because it doesn't have that resume ability to it on transfer so good person a note personally I don't care which one I use I usually if I'm in terminal already I can transfer files directly use an SCP it's sometimes it's a little faster in my opinion if I don't have my file browser up or I don't have a bookmark sometimes I'm just like oh it's a one-off file to a remote server I'll just use SCP but with that said let's go ahead and do a transfer so let's say I want to transfer the stream files stream titles at the bottom here you go SCP the source is actually gonna be stream but the source could also come from your remote server too so keep that in mind this is just source and destination so it's SCP space source which is either your local file and you can also do like a full path name for this so you can go home Titus stream titles this would be the source and then for the destination you need to put your user name which would be head administrator at our address 69.6 and then colon and then you can put a little tightly there to do just your home directory this would transfer it right in your home or if you had a specific location that the administrator users have privileged to and owns you can also put it there which I know opt minecraft it does have so I could put this stream titles directly over there so let's hit enter type in our password and it transferred that over so if I look at this and I do just a listing right here you'll see the stream titles right on this portion so it actually transferred that over so I can just remove this and this is a basic command line transfer just remember SCP space or space destination and that's basically it now let's exit back and I'm going to show you that syntax one more time now on this I could easily take from the remote server and put the administrator at the IP : and then the actual path name like this and put it at the very beginning and then put like tidally so it can look something like this now this would transfer a the whole minecraft server or a folder name if I wanted to transfer that much but let's say there was a config file like I think the ulid a text file I think that is there and now if we look at our home directory we'll have let's just do a listing and you'll see the EULA text right there so if I at EULA text you'll see that that has all of that and accept the end-user license for Minecraft but this is just a basic configuration back and forth using the terminal same thing can be done in Windows now so we'll jump over to Windows but overall for Linux I really enjoy the ease in native ability to do all these transfers no third-party downloads are really necessary it comes with SSH and SCP built-in and SFTP if you're using your simple file browser like this now you can also put it in your places and your bookmarks on the side of whatever filed if it's dolphin or Nautilus it simply doesn't matter they both do the same thing they just look a little different so with that let's that's pretty much Linux in a nutshell transferring files through SSH so we'll open up our read browser here and we're gonna need a couple utilities that we're gonna use for this tutorial now a lot of the native stuff there is some aspects of command the line and PowerShell that you can use but I don't like them mainly because they suck and what I like is just to download third-party utilities when it comes to windows there's two real utilities here that really need it is putty and winscp these types of things are used all the time by me when I'm on a Windows box and I'm transferring files back and forth or utilizing SSH often I really like both these utilities so I usually always go to night-night and just download both of them straight out of the box it's a very simplistic install they're very small utilities and very easy to set up so it usually takes no time at all I use night-night just because it goes ahead and accepts everything for me and installs it so it makes it quite a bit easier so that's what I use right there we've installed them as you saw no time at all we'll open this up and we'll go ahead and create a couple things so there's SFTP we just talked about or we have SCP transfers - this is one of the cool things about winscp and why I like it more than FileZilla you saw file at Zilla you can also use on that list however I like winscp just a bit better I use FileZilla for a long time but I find when SCP is a little bit faster and also it has a cleaner interface in my opinion so let's go ahead and sign into our minecraft server and see what we have here and this is just I use minecraft that's just a default but really anything will work here so we'll go ahead and save this say password okay and login you accept the key and we're on the server and we can go ahead and browse around now whatever user your log it in to you have permissions as that user so if you try and drag and drop a whole bunch of stuff under your root folder and you not as logged in as root it's not gonna work because you're logged in as your user so very important to understand the permissions of Linux when doing SSH but that's a whole different a video if you're having trouble transferring stuff just make sure you have ownership of the user you're used to log in via SSH so here is this entire directory through winscp this is the GUI version which is also very good now for the command line aspect of this there's something called PS CP now it usually comes with putty and this one let's go ahead and pull up I think the putty folder has this so we'll go ahead and open up the file location and that's that P SCP right here so if we open this so with PS CP from the actual Program Files putty directory here we can actually use this just like we use the SCP command in Linux so let's go ahead and do that and we'll transfer this readme file back and forth so just to demonstrate a command line now now I'm gonna many windows users are gonna be using command line so we'll just use PowerShell for this and we'll just go see Dec : we'll go to the putty directory do a listing and you'll see that P SCP command so we'll do P SCP for the source will do readme and for the destination we're gonna do the same thing we did in Linux so we'll do administrator at 192 168 69.6 colon and we'll go ahead and pop this into the home directory go store key and cache yes we'll type our password in and it transferred that file so now if we SCP directly into that or SSH directly into that we'll actually see that file and let's go ahead and do that well we'll just pull up our GUI just so you can see it now it put us into the opt directory and we'll just go back here go into home just show you a little browse ability and it actually transferred it has this which let's open it and this is the putty readme file we just transferred now I made an error error when I actually transferred this file into the home directory and forgot to name it so this was a little bit off with saying the dot backslash readme that messed up the file name I probably should have put just readme dot txt and then into this directory but you know tomato tomahto you got the idea not very many people are gonna use PS CP so with that I'm gonna go ahead and shut this down that is the GUI version and then the powershell slash command line version and windows you can do it both when it comes to computers whatever you want to use whatever operating system you want to use it can be done you just gotta learn it so there you have it that is all of the SSH transferring of files there's ways to do it both in the terminal work command line and then also just using a graphic user interface and you just pick your poison on this one I personally a lot of times I end up just using the terminal but I know most of the population would rather just use their built-in file explorer especially when it comes to Linux it's just right there and just typing SFTP colon for slash and then your your server name and off you go it's just awesome in that direction however sometimes this can be a little bit of a slow process and using terminal straight s ap does give you a slight bump in performance but you know to each his own I wanted to give you the choice to figure out which one you like the best and you can compare it on your own time and either way you know you'll always find a way to make it work which is pretty awesome but with all that let me know your thoughts down in the comment section did I miss anything was there any other tools that you might recommend I know I left out FileZilla for this but I like when SCP a lot more and honestly if you're on Linux just use the native tools I figure those are just as good if not better so with all that let me know if you have any other thoughts down in the comments and a big shout out to all my patrons without you I couldn't make videos like this one and I'll see you in the next video
Info
Channel: Chris Titus Tech
Views: 127,506
Rating: undefined out of 5
Keywords: chris titus tech, ssh, how to, transfer, transfer files, linux, how to ssh, how to access vm with ssh or sftp, how to raspberry pi, how to retropie, how to filezilla, how to ssh from one linux ec2 instance to another, how to reclbox, ssh file transfer ' mp4, tutorial, how to copy paste to virtualbox, how to sftp, ssh tutorial, how to sftp to vm, how to ftp upload, secure shell, scp command, gnu/linux (operating system), file transfer, command line, secure copy
Id: w_OwmqjAcn0
Channel Id: undefined
Length: 15min 14sec (914 seconds)
Published: Fri Sep 20 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.