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

0
81
how to copying file from remote server to local system
Copy a File from Local System to a Remote Server using SCP Command

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.

LEAVE A REPLY

Please enter your comment!
Please enter your name here