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 setup a remote MySQL database connection in PHPStorm

Updated 1st October 2023

PHPStorm is packed full of features designed to make the development process for PHP developers efficient and streamlined. Although Jetbrains have a standalone product for interacting with databases, named DataGrip, PHPStrom ships with the Database Tools and SQL plugin. This tools is powerful, integrated directly within the IDE, and provides a convinient way to intract

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