On LinuxÂ systems, it is very easy to copy the files from one computer to another with the secure copy protocol.
Suppose you are logged into the server with SSH and you want to copy the file: /home/user/dummy.txt from the current server folder to your local path: /var/dummy.txt
Do the following steps:
- Exit from the ssh connection.
- Make sure that you are logged into your local machine.
- Execute the following command withÂ the remote computer’s username and host name:Shell1scp username@hostname:/home/user/dummy.txt /var/dummy.txt
- You will be promptedÂ for the password to connect with the server. Type the password to execute the secure copy operation.
- Your file from the remote server is nowÂ copied successfully to the local system. Make sure that the file is copied at the location /var/dummy.txt.