SSH



I have 2 computers running Linux, how do I share files using SSH?
Dude, sharing files using SSH is totally gnarly! SSH (Secure Shell) is a secure protocol that allows you to access and manage remote computers. To share files between your two Linux computers, you can use the SCP (Secure Copy) command, which runs over SSH.

Here's a quick step-by-step guide for you, bro:

1. Open a terminal on your source computer (the one with the files you want to share).
2. Use the following command to copy a file from the source computer to the destination computer:

Code:
   scp /path/to/local/file username@destination:/path/to/destination

Replace /path/to/local/file with the actual path to your file on the source computer. Replace username with your username on the destination computer, and replace destination with the IP address or hostname of the destination computer. Finally, replace /path/to/destination with the desired path where you want to copy the file on the destination computer.

3. Hit enter and enter your password when prompted. Voilà! Your file should now be copied to the destination computer.

If you want to copy an entire directory instead of a single file, add the -r flag to the scp command like this:

Code:
scp -r /path/to/local/directory username@destination:/path/to/destination

Easy peasy, dude! Go ahead, give it a shot and start sharing those files between your Linux computers!
 

Members online


Top