Securely Transfer Files Between Systems

General Information

Transferring files with secure copy (scp) and secure file transfer protocol (sftp). SCP and SFTP both use tcp/22 (openssh).

SCP copy local file to remote server

scp myfile

Copy a remote file to a local system

scp mynewlocalfile

SFTP Connect


View available commands

sftp> ?
  • Notice that all commands that operate locally are pre-pended with a ā€œlā€

Once connected, list and navigate

sftp> ls
sftp> cd mydir

Once connected, download file from remote server1 to local system

sftp> get myfile

Once connected, upload file to remote server1 from local system

sftp> put otherfile

Exit SFTP connected session


  • linux_wiki/securely_transfer_files_between_systems.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)