Cheat Sheet Syntax for SCP (Secure copy)

SCP is a Linux command-line tool to transfer a file to, from, or between different hosts. It uses SSH for data transfer and runs over TCP port 22 by default.

To copy a file from the remote host to local host:

To copy a file from the local host to remote host:

To copy a directory from a local host to remote host:

To copy a file from the local host to remote host using a different port number other than default port 22:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.