Upload files to server using SCP / SSH

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

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:

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

It is only for example.

Anil Kumar Panigrahi

With more than 10 years experience in PHP and Founder of Anil Labs, a blog for PHP and related posts. contributed posts regarding CodeIgniter, CakePHP and Learn PHP online

Contact : [email protected]

You may also like...

1 Response

  1. Shirisha says:

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

Leave a Reply

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