How to transfer files from and to VPS
When you want to upload or download files to your VPS, there are several ways to do it.
Table of Contents
- SSHFS (only for Linux local computers): mount a remote folder in your computer
- SFTP (Filezilla)
- Web Server (only for download):
SSHFS (only for Linux local computers): mount a remote folder in your computer
Type these commands in your Linux computer (
sshfs is usually installed with
sshfs <username>@<ip>:<remote path> <mount point> -o IdentityFile=<private key file full path> umount <mount point> #for unmount
Use full paths when referring to a folder or to the private key file.
“Mount point” is an empty local folder path where you want to mount the remote folder.
- Click on the top-left icon (“Site Manager”).
- Click on “New site” and type a name for the connection.
- In “Protocol” select “SFTP - SSH File Transfer Protocol”.
- Type the public IP or DNS on “Host”.
- Select “Key File” in “Logon Type”. (If you use a password to connect to the server, type the username and password and skip steps 6 and 7).
- Type the username.
- Click “Browse” to select the private key file. In the pop-up window, select your private key format (PEM or PPK) at the bottom-right corner and then the private key file.
- Finally, click “Connect”.
SCP command line tool is usually installed with
ssh in Linux distros.
Type these commands on your local device:
- Transfer files from server to local computer:
scp -i <privatekey> -r <remote-user>@<remote-ip>:<remote-file> </local/path/>
- Transfer files to server:
scp <local-file> -i <privatekey> <remote-user>@<remote-ip>:<remote-path>
Web Server (only for download):
- Type this in your VPS (in your working directory):
sudo python3 -m http.server 80 # you do not need "sudo" if port >=1024
- Go to