Now, let's see tutorial of how to upload file to server using ssh. This article goes in detailed on how to upload files to vps server using command line. We will look at example of upload file from local machine to linux server. you will learn how to upload file from local to server using ssh.
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...
Do you like below Tutorials ?
- Angular Json Pipe Example | Json Pipe in Angular 9/8/7
- Angular Slice Pipe Example | Slice Pipe in Angular 9/8/7
- Angular Uppercase Pipe Example | Uppercase Pipe in Angular 9/8/7
- Angular LowerCase Pipe Example | LowerCase Pipe in Angular 9/8/7
- Angular Titlecase Pipe Example | Titlecase Pipe in Angular 9/8/7
- Angular KeyValue Pipe Example | KeyValue Pipe in Angular 9/8/7
- Call Method from One Component to Another Component in Angular
- Angular Push Object into Array Example