2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00
cheat.sheets/sheets/scp

16 lines
633 B
Plaintext
Raw Normal View History

# scp
# Secure copy (remote file copy program)
# Secury copies files from remote ADDR's APTH to the current-working-directory.
# By default here, port 22 is used, or whichever port is otherwise configured.
scp ADDR:PATH ./
# Using aliases (not Bash aliases) work with scp(1) as well. In this example, -
# the PATH1 of the first remote source defined as ALIAS1 is sent to PATH2 of
# the remote destination defined as ALIAS2.
scp ALIAS1:PATH1 ALIAS2:PATH2
# You can use the `-P` flag -- uppercase, unlike ssh(1) -- to determine the
# PORT, in-case it's non-standard (not 22) or not defined within an alias.
scp -P PORT ADDR:PATH ./