How to Copy Files Using SSH

preview_player
Показать описание
Using SSH you can create a remote session and transfer files onto your system as per your need. Follow this tutorial to learn how.

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.

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.
Рекомендации по теме
Комментарии
Автор

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 🙏🙏

JD-gwrl
Автор

The best video I have ever seen I want to give him a hug.

taggartm
Автор

After 10 years, it keeps working... love it!

juang.
Автор

Perfect! I can do tons of amazing projects with this info.

UbingDummy
Автор

thanks, Perfect Video.
Short
precises
smart way of covering the topic

Guest-gyvp
Автор

Can you reverse this to put something into the remote?

Scott-zixv
Автор

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

xarisfil
Автор

I need to copy the file the other way — to the remote system. How would I did that?

designstudio
Автор

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

namratashah
Автор

My root password for the remote machine works via SSH but not with SCP?

franchyze
Автор

How to download folder or folders via ssh?

swimmingshi
Автор

I got

ssh: connect to host x.x.x.x port 22: Network is unreachable

Can anyone plz help !

dawzrd
Автор

please make video on Copy files from code commit repositories to EC2 VM

subbaraju
Автор

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"

Jokamutta
Автор

It would be good to zoom in on the screen so phone users can read what typed.

Algator
Автор

error prints no such file or directory

sweetblunt_
Автор

I assume this works the other way as well?

olivernote
Автор

im trying to transfer from linux desktop to windows desktop

Janossmc
Автор

this would help if i could see the terminal so this is no help

darthdub