Hi friends, In this post I am going to explain how to upload your large files / database files to server using terminal with the help of commands SCP or SSH.

Upload files to server using scp or ssh by Anil Kumar Panigrahi

Upload files to server using scp or ssh by Anil Kumar Panigrahi

Basic command for uploading files

1
scp -P [PORT NUMBER] [PATH OF YOUR LOCAL FILE] [USERNAME]@[HOST]:[DESTINATION PATH]

Here

[PORT NUMBER] : The default port number is 22. We can specify other than that also.

[PATH OF YOUR LOCAL FILE] : Your source file ( From which location you need to upload files). i.e. your local system path.

[USERNAME] : Your server’s username from which name you are accessing the server

[HOST] : Your server’s IP address or domain name to access the server

[DESTINATION PATH] : To which location your files needs to upload.

Eg:

1
scp -P 225 /home/anillabs/Desktop/testdb.sql [email protected]:/www/phpproject/db/

It is only for example.


3 Comments

Shirisha · April 3, 2014 at 6:12 am

Very useful post. Thanks for sharing such a nice information!!!!

How to create virtual hosts in Nginx - Anil Labs · January 24, 2022 at 4:25 pm

[…] Step 1: Connect the server using SSH […]

Extend the hard disk volume of Ubuntu in AWS - Anil Labs · March 6, 2023 at 4:44 am

[…] size for the volume and click on “Modify”. Step 7: Start the Ubuntu instance. Step 8: SSH into the Ubuntu instance. Step 9: Run the following command to check the file system […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *