- A command for transferring files between network-connected hosts using SSH
- Since it uses SSH, files can be sent and received using Identity Files such as SSH key files
LocaltoRemote(send)RemotetoLocal(retrieve)RemotetoRemote(transfer between hosts) are all possible
scp [options ...] [source] [target]-r- Recursively copy all folders
- Option used when copying folders
- Specify the folder as the target to transfer
- If there are symbolic links, instead of creating a symbolic link at the target, it copies the file or folder that the symbolic link points to
- Specify the folder as the target to transfer
-P- Option to specify the SSH port
-i- Option to specify the path to an identity file such as an SSH key file
-v- Verbose mode, used for debugging with detailed output
-p- Preserve file modification time and permissions
+
ex)
scp -i [pem key path] [file path to upload] [ec2 address]:~