Skip to the content.

File Transfer Between Linux Computers (rsync)

SSH Setup

First, ensure that the SSH service is installed and running on the target machine:

# Install SSH server
sudo apt-get install openssh-server
# Start SSH service
sudo systemctl start ssh
# Check SSH service status (optional)
sudo systemctl status ssh

File Transfer with rsync

You can use the rsync command to transfer files:

rsync -rv /source/directory/ user@target_ip:/destination/directory/

Example

rsync -rv /var/www/html/project_folder/ user@192.168.1.100:/var/www/html/project_folder/

Notes

Security