File Transfer Protocols: FTP, SFTP, RSYNC, SCP
What is FTP?
FTP (File Transfer Protocol) is a standard network protocol used for the transfer of computer files between a client and server on a computer network. FTP uses separate channels for data and control and typically runs on port 21.
For more information, visit the official FTP documentation.
What is SFTP?
SFTP (Secure File Transfer Protocol) is a secure version of FTP that uses SSH (Secure Shell) to encrypt data. SFTP ensures that data is transferred securely over an encrypted connection, providing both authentication and data confidentiality.
For more information, visit the official SFTP documentation.
What is RSYNC?
RSYNC (Remote Sync) is a utility for efficiently transferring and synchronizing files between a computer and an external hard drive or between two computers. It uses delta encoding and compression to transfer only the changes between source and destination, making it very efficient for backups and mirroring.
For more information, visit the official RSYNC documentation.
What is SCP?
SCP (Secure Copy Protocol) is a method of securely transferring files between local and remote hosts. SCP is based on the SSH protocol and uses port 22 for secure file transfer, ensuring encryption and security for the data in transit.
For more information, visit the official SCP documentation.
How to Transfer Files and Folders Between Servers Using These Protocols
FTP
ftp [hostname]
username: [your-username]
password: [your-password]
put [local-file] [remote-file]
get [remote-file] [local-file]
bye
Replace [hostname], [your-username], [your-password], [local-file], and [remote-file] with appropriate values.
SFTP
sftp [username]@[hostname]
password: [your-password]
put [local-file] [remote-file]
get [remote-file] [local-file]
exit
Replace [hostname], [username], [your-password], [local-file], and [remote-file] with appropriate values.
RSYNC
rsync -avz [local-file-or-directory] [username]@[hostname]:[remote-directory]
rsync -avz [username]@[hostname]:[remote-file-or-directory] [local-directory]
Replace [local-file-or-directory], [username], [hostname], [remote-directory], [remote-file-or-directory], and [local-directory] with appropriate values.
SCP
scp [local-file] [username]@[hostname]:[remote-file]
scp [username]@[hostname]:[remote-file] [local-file]
Replace [local-file], [username], [hostname], and [remote-file] with appropriate values.
Additional Resources