How to Copy Files Using SSH
Using SSH you can create a remote session and transfer files onto your system as per your need. Follow this tutorial to learn how.
Don’t forget to check out our site http://howtech.tv/ for more free how-to videos!
http://youtube.com/ithowtovids – our feed
http://www.facebook.com/howtechtv – join us on facebook
https://plus.google.com/103440382717658277879 – our group in Google+
In this tutorial we will show you how to copy files using SSH. You can transfer files using ssh as per your own requirement and need.
Secure Shell, or SSH, allows you to securely create a remote session which can then be used for ssh file transfer.
Step 1 — List the contents
To see its implementation, let’s list the contents of the directory first.
Step 2 — Create an SSH session with root user
Now we will create an SSH session with the root user, who in this case is the user of the remote system. And after that, we will define the IP address we want to connect with.
With that done, you will be required to type in the root password of the remote system you are connecting with.
Step 3 — List contents of remote system’s home directory
Now you can see that we are in the root folder of the remote system.
Now let’s use the LS command to list the contents of the remote system’s home directory. From here we will copy the veriable.sh script to our local system.
Step 4 — Use the “scp” command
For that, first let’s log out of the remote session and use the “scp” command followed by the user of the remote system. After that, we will type in the IP address followed by the exact path of the file we want to copy.
Step 5 — Enter the password
Now you will be required to type the password of the remote system and hit enter.
With that done, the file will be sent to your system using the ssh file transfer.
Step 6 — List the directory contents
If we list the contents of the directory over here, you can see that the file is now present on our system’s root folder.
And that’s it, from the above steps you can learn how to transfer files using ssh.
by HOWTECH
linux ftp command
After 10 years, it keeps working… love it!
ssh remote 'tar zcf – /etc/resolv.conf' | tar zxf –
That's a good explanation
the only tutorial that I found that really showed that we need to log out of the server first before passing the file (yeah as a not techy person this was a very dumb mistake on my part but to be fair none of the guides really indicated that ;-;)
thank you this was really a great help 🙏🙏
It would be good to zoom in on the screen so phone users can read what typed.
thanks
Absolute Rubbish, doesn't work
pretty useful video not gonna lie. I used it even to submit files in hpc. Btw I have it on loop because the voice is quite nice and the pronunciation of the terms xD
How to download folder or folders via ssh?
error prints no such file or directory
please make video on Copy files from code commit repositories to EC2 VM
thank you!
I got
ssh: connect to host x.x.x.x port 22: Network is unreachable
Can anyone plz help !
Can you reverse this to put something into the remote?
You misspelled "variable."
https://www.youtube.com/watch?v=zKnmYXEOCRQ&pbjreload=10
This doesnt work
4:36 AM?
When he types scp root..:/home/variable.sh", I replaced home with Documents, the server name with the one I'm using, and then variable.sh with a folder name on the server, but I didn't see it copy into Documents. Can someone help me with this? Would appreciate it
I'm having issues when trying this with Virtualbox that has Xubuntu. I get error: "ssh: connect to host (My IP address) port 22: Connection refused"
My root password for the remote machine works via SSH but not with SCP?
The best video I have ever seen I want to give him a hug.
thanks bouy
that greate
thanks, Perfect Video.
Short
precises
smart way of covering the topic
This is easyer to transfer a whole dir from server A to server B
Just log in to server A and do:
scp -r /home/admin root@serverBIp:/home/oldvps/.
In this case it will transfer the whole dir from /home/admin to server B and locate it at /home/oldvps
I assume this works the other way as well?
im trying to transfer from linux desktop to windows desktop
thaks a lot its really helpfull
Perfect! I can do tons of amazing projects with this info.
this would help if i could see the terminal so this is no help