Monday, January 6, 2025
HomeQ&AHow to securely copy files in Linux/scp command

How to securely copy files in Linux/scp command

To securely copy files in Linux using the scp (secure copy) command, you can use the following syntax

scp /path/to/local/file username@remote_host:/path/to/remote/destinaton

This command securely transfers a file from your local machine to a remote server, using SSH encryption. You can also copy files from the remote server to your local machine:

See also  What language is the scientific name written in?

scp username@remote_host:/path/to/remote/file /path/to/local/destination

For added security, use the -C option to enable compression and -P to specify a custom port:

scp -P 2222 -C /path/to/local/file username@remote_host:/path/to/remote/destination

 

Previous article
Next article
RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x