Upload files to server using SCP / SSH

in Articles, OS, Ubuntu / 1 Comment

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 root@0.0.0.0:/www/phpproject/db/

It is only for example.

With more than 7 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 : php.anil@gmail.com

Discussion 1 Comment

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>