Contact Info

Atlas Cloud LLC 600 Cleveland Street Suite 348 Clearwater, FL 33755 USA

[email protected]

Client Area
Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3

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

200 Must-Know Linux Commands for File Transferring

FTP Commands

  • ftp [hostname]: Connect to FTP server
  • open [hostname]: Open a connection to FTP server
  • close: Close the FTP connection
  • quit: Quit the FTP session
  • bye: End the FTP session
  • user [username] [password]: Log in with username and password
  • anonymous: Log in anonymously
  • ascii: Set transfer mode to ASCII
  • binary: Set transfer mode to binary
  • lcd [directory]: Change local directory
  • cd [directory]: Change remote directory
  • dir: List files in remote directory
  • ls: List files in remote directory
  • get [remote-file]: Download a file
  • mget [remote-files]: Download multiple files
  • put [local-file]: Upload a file
  • mput [local-files]: Upload multiple files
  • rename [old-name] [new-name]: Rename a file
  • delete [filename]: Delete a file
  • mdelete [files]: Delete multiple files
  • rmdir [directory]: Remove a directory
  • mkdir [directory]: Create a directory
  • status: Show current status
  • pwd: Print working directory
  • lpwd: Print local working directory
  • prompt: Toggle interactive mode
  • hash: Toggle hash mark printing
  • passive: Enter passive mode
  • active: Enter active mode
  • chmod [mode] [file]: Change file permissions
  • quote [command]: Send arbitrary command
  • site [parameters]: Send site-specific command
  • system: Show server system type
  • bell: Ring bell on command completion
  • verbose: Toggle verbose mode
  • trace: Toggle packet tracing
  • debug: Toggle debugging mode
  • restart [marker]: Restart file transfer
  • account [passwd]: Send account password
  • sunique: Toggle store unique
  • runique: Toggle receive unique
  • proxy: Proxy FTP commands
  • type [type-name]: Set file transfer type
  • case: Toggle case mapping
  • cr: Toggle carriage return stripping
  • nlist: List remote files without details
  • literal [arg1 arg2 ...]: Send arbitrary command with arguments
  • page [filename]: Display file contents
  • proxy ftp command: Execute FTP command on secondary connection

SFTP Commands

  • sftp [username]@[hostname]: Connect to SFTP server
  • cd [directory]: Change remote directory
  • lcd [local-directory]: Change local directory
  • pwd: Print remote working directory
  • lpwd: Print local working directory
  • ls: List remote directory contents
  • lls: List local directory contents
  • mkdir [directory]: Create remote directory
  • rmdir [directory]: Remove remote directory
  • rm [file]: Remove remote file
  • get [remote-file]: Download remote file
  • get -r [remote-directory]: Download remote directory
  • put [local-file]: Upload local file
  • put -r [local-directory]: Upload local directory
  • rename [old-name] [new-name]: Rename remote file
  • exit: Exit SFTP session
  • quit: Quit SFTP session
  • bye: End SFTP session
  • help: Display help text
  • ?: Display help text
  • chmod [permissions] [file]: Change remote file permissions
  • chown [owner] [file]: Change remote file owner
  • chgrp [group] [file]: Change remote file group
  • lls -l: List local directory contents with details
  • lmkdir [directory]: Create local directory
  • ln [target] [linkname]: Create remote hard link
  • ln -s [target] [linkname]: Create remote symbolic link
  • lrename [old-name] [new-name]: Rename local file
  • lumask [mask]: Set local file creation mask

RSYNC Commands

  • rsync [options] [source] [destination]: Synchronize files
  • rsync -avz [source] [destination]: Archive mode with compression
  • rsync -r [source] [destination]: Recursively copy files
  • rsync -e ssh [source] [destination]: Use SSH for data transfer
  • rsync -avz [user]@[host]:[remote-dir] [local-dir]: Download from remote directory
  • rsync --progress [source] [destination]: Show progress during transfer
  • rsync -a --delete [source] [destination]: Delete files not in source
  • rsync -avz --exclude '[pattern]' [source] [destination]: Exclude files matching pattern
  • rsync --dry-run [source] [destination]: Perform a trial run
  • rsync -z [source] [destination]: Compress file data during transfer
  • rsync --bwlimit=[KBPS] [source] [destination]: Limit I/O bandwidth
  • rsync --partial [source] [destination]: Keep partially transferred files
  • rsync --append [source] [destination]: Append data onto files
  • rsync --remove-source-files [source] [destination]: Remove source files after transfer
  • rsync --backup [source] [destination]: Create backups of updated files
  • rsync --backup-dir=[dir] [source] [destination]: Store backups in specified directory
  • rsync --exclude-from=[file] [source] [destination]: Exclude files listed in file
  • rsync -P [source] [destination]: Show progress and keep partial files
  • rsync --rsync-path=[path] [source] [destination]: Specify alternate rsync binary
  • rsync -av --update [source] [destination]: Skip files that are newer on destination
  • rsync -n [source] [destination]: Perform a dry run

SCP Commands

  • scp [source] [user]@[host]:[destination]: Copy file to remote host
  • scp [user]@[host]:[source] [destination]: Copy file from remote host
  • scp -r [source-directory] [user]@[host]:[destination-directory]: Copy directory recursively
  • scp -P [port] [source] [user]@[host]:[destination]: Specify port for SCP
  • scp -i [identity_file] [source] [user]@[host]:[destination]: Use specified identity file
  • scp -o [option] [source] [user]@[host]:[destination]: Pass option to SSH
  • scp -C [source] [user]@[host]:[destination]: Enable compression
  • scp -l [limit] [source] [user]@[host]:[destination]: Limit bandwidth usage
  • scp -v [source] [user]@[host]:[destination]: Verbose mode
  • scp -q [source] [user]@[host]:[destination]: Quiet mode
  • scp -4 [source] [user]@[host]:[destination]: Use IPv4 only
  • scp -6 [source] [user]@[host]:[destination]: Use IPv6 only
  • scp -p [source] [user]@[host]:[destination]: Preserve file attributes
  • scp -B [source] [user]@[host]:[destination]: Batch mode
  • scp -S [program] [source] [user]@[host]:[destination]: Specify SSH program
  • scp -F [configfile] [source] [user]@[host]:[destination]: Use specified SSH config file
Share this Post
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x