Managing a system remotely is great using SSH. However, many do not know that SSH can also help in uploading and downloading files remotely.
To try the file transfer tools, we need two Linux systems that can ping each other. We also need the OpenSSH package to be installed on one system and the SSH server should be running.
Linux has a collection of tools that can help in transferring data between networked computers. We will see how a few of them work in this section:
- Suppose we have a
myfile.txt
file on the local system that we want to copy to the remote system. The command to do so as follows:
scp myfile.txt [email protected]:~Desktop/
Here, the remote location where the file will be copied is the Desktop
directory of the user account being used to connect.
- When we check on the remote SSH system, we can see that the
myfile.txt
file has been copied successfully:
- Now let's suppose we have a directory,
mydata
in the local system, that we...