How to Upload File to Linux Server from My Computer?

By Hardik Savani | June 13, 2020 | Category : Server


This tutorial will give you example of how to upload file from local to server using ssh. This post will give you simple example of how to transfer file from local to server using ssh. Here you will learn how to upload file to server using ssh. i explained simply about how to upload files to vps server using command line.

Sometime we have large file on our local machine and we want to upload it on our linux server then you can not upload using any file system from project. But you need to upload it directly on server.

So, if you just access your vps linux server using ssh then you can do it easily. i will help you how to transfer file form local to server via ssh. so let's see bellow two way to upload your local machine file to server.

You can easily upload file from macOS or Linux.

Using scp

scp -r /path/local/files [email protected]:0.0.0.0:/path/on/my/server

/path/local/files: this is the path of local file that you want to upload on server.

root: this is a username of your linux server.

0.0.0.0: this is a ip address of your linux server.

/path/on/my/server: this is the path of server folder where you upload file on server.

Using rsync

rsync -avz /path/local/files [email protected]:0.0.0.0:/path/on/my/server

/path/local/files: this is the path of local file that you want to upload on server.

root: this is a username of your linux server.

0.0.0.0: this is a ip address of your linux server.

/path/on/my/server: this is the path of server folder where you upload file on server.

I hope it can help you...



Tags : Server Ubuntu


Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: