ItSolutionStuff.com

How to Upload File to Linux Server from My Computer?

By Hardik Savani • May 1, 2024
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 root@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 root@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...

Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

How to Downgrade php 7.4 to 7.3 Ubuntu?

Read Now →

How to create quick apache virtual host in Ubuntu?

Read Now →

How to Install Composer using Command Line in Ubuntu?

Read Now →

How to Install Laravel on Windows Xampp Server?

Read Now →

How to create virtual host in ubuntu apache?

Read Now →

How to Uninstall Cordova and Ionic in Ubuntu?

Read Now →

How to Install Sublime Text Editor 3 in Ubuntu?

Read Now →

How to Increase Upload File Size Limit PHP in Ubuntu?

Read Now →

How to Set ANDROID_HOME Environment Variable in Ubuntu?

Read Now →

How to Upgrade Node.js Version in Ubuntu?

Read Now →

How to Enable Rewrite Mode for Apache in Ubuntu?

Read Now →