- If your AI-generated code becomes faulty, who faces the most liability exposure?
- These discoutned earbuds deliver audio so high quality, you'll forget they're mid-range
- This Galaxy Watch is one of my top smartwatches for 2024 and it's received a huge discount
- One of my favorite Android smartwatches isn't from Google or OnePlus (and it's on sale)
- The Urgent Need for Data Minimization Standards
How to Use the Scp Command to Securely Send a File from Your Desktop to a Server
Learn how to use the scp command to transfer files securely with this step-by-step tutorial by expert Jack Wallen.
If you regularly have to copy files from your desktop to another desktop or server, you might not want to use less secure protocols such as FTP. Fortunately, Secure Shell includes a command that makes copying files to and from a remote machine not only secure but fairly easy. Let me show you how it’s done.
All you’ll need for this are two machines, both of which have SSH installed. The scp command does work with SSH key authentication, so if you have it enabled, you shouldn’t have any problems with the command. How does it work? Easy.
Say, for instance, you have the file trtest in the Documents directory on your desktop computer, and you want to copy it to your home directory on a machine at IP address 192.168.1.161. The command to copy that file to the server would be
scp Documents/trtest USER@192.168.1.161:/home/USER
where USER is your username.
You’ll be prompted for your remote password. Upon successful authentication, the file will copy to the remote server. If you want to copy that file from the remote server to your Documents directory on your local machine, the command would be
scp USER@192.168.1.161:/home/USER/trtest /home/USER/Documents
where USER is your username.
And that’s all there is to it. Thanks to the scp command, you can securely copy files to and from remote machines with ease.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.