ServerCake India

How to Copy a File from Local System to a Remote Server using SCP Command?

how to copying file from local system to remote server using scp command
Copy a File from Local System to a Remote Server using SCP Command Graphical Illustration

SCP Command to copy a file from Local system to a Remote server:

SCP allows copying a file from a local system to a remote system by using SSH. SSH provides authentication and maintains a secure connection to transfer files. Scp command used to copy a file from local system to the remote server. Throughout this way the file copying process in a secured way, we strongly recommend this method when you in need of copying your files to the remote server.

The command SCP filename [email protected]:/some/remote/directory  is the syntax used to copy a file from local system to a remote server.

For example,  use the command scp foo.txt [email protected]:/some/remote/directoryto copy a file foo.txt

The parameter -P is used to copy a file using a port number from a local host to a remote server.

For example,  the command scp -P 2264 foo.txt [email protected]:/some/remote/directory is used to copy a file using the port number from a local system to the remote server.

While using this SCP commands you can add the respective flags as per the need which could ease up your work and we advise you to double check the host address and directory locations to avoid any miscopying.

Editorial Team

Editorial Team at ServerCake India Blog is a team of experts in Server Administration, Business Development, Management, SEO Analyst & Graphic Designers with more than 5+ years of expertise.

Add comment