The command orders and tells the operating system to copy one or more files over a secure shell connection, better known as ssh connection.
SCP Command to copy a file from Local system to a Remote server:
SCP command stands for Secure Copy Protocol. 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 secure way, we strongly recommend this method when you in need of copying your files to the remote server.
SCP filename firstname.lastname@example.org:/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@example.com:/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 firstname.lastname@example.org:/some/remote/directory 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.