How to Upload and Download files to and from a Linux server over SSH

By Dillon Smart · · · 0 Comments

Its common place to need to upload and download files to and from a remote Linux server.

To upload and download files from a remote Linux server you can use the scp (secure copy) command.

To download a file you can use:

scp username@ip-or-server-name:~/path/to/file/your/downloading /path/to/location/to/download/to

To upload a file you can use:

scp /path/to/file/your/uploading username@ip-or-server-name:/path/to/location/to/upload/to

Note: It is best practice to connect to remote servers using either a strong unique password or using an SSH key pair.

Refer to How to generate an SSH key and add to authorized_keys

LinuxSSHUbuntu

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IPtables – How to block and unblock IP Addresses in Linux

Updated 14th December 2023

Not long ago, I noticed some strange activity on a server I manage. The server, running Ubuntu 22.04, was receiving high volumes of traffic from a single IP Address. After some investigation, I decided the activity resembled that of web scrapping, so I decided to block the IP Address. Iptables or ufw I hear you

How to set up SSH on Raspberry Pi

Updated 16th August 2022

In this post, I am going to show you how to set up SSH on a Raspberry Pi. Step 1: Raspberry Pi config menu First, open a new terminal and execute the command below to open the Raspberry Pi config menu. sudo rasps-config  Select “Interfacing Options” and press ENTER. Then select “SSH” and press ENTER. 

Start WSL2 services on Windows startup

Updated 16th August 2022

In some circumstances, you may want to automatically start your WSL2 (Windows Subsystem for Linux) services on Windows startup such as Apache2, Nginx, and MySQL. Follow along below to learn how to start your services when you boot your machine. Create a startup script The first step is to create a startup script. This is