How to Upload File to Linux Server from My Computer?
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
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. 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, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Downgrade php 7.4 to 7.3 Ubuntu?
- How to create quick apache virtual host in Ubuntu?
- How to Install Composer using Command Line in Ubuntu?
- How to Install Laravel on Windows Xampp Server?
- How to create virtual host in ubuntu apache?
- How to Uninstall Cordova and Ionic in Ubuntu?
- How to Install Sublime Text Editor 3 in Ubuntu?
- How to Increase Upload File Size Limit PHP in Ubuntu?
- How to Set ANDROID_HOME Environment Variable in Ubuntu?
- How to Upgrade Node.js Version in Ubuntu?
- How to Enable Rewrite Mode for Apache in Ubuntu?