June 23, 2026 | 5 min read
Transfer Files from Ubuntu to Arch Linux over SSH/SFTP
Requirements
Both machines must:
- be powered on
- be connected to the same local network/Wi-Fi
- have SSH available on the Arch machine
1. Setup SSH server on Arch Linux
On the Arch machine:
Install OpenSSH:
bash
COPIED!
sudo pacman -S openssh
Enable and start SSH server:
bash
COPIED!
sudo systemctl enable --now sshd
Verify SSH server is running:
bash
COPIED!
systemctl status sshd
You should see:
text
COPIED!
active (running)
2. Find Arch machine IP address
On Arch:
bash
COPIED!
ip addr
Look for your Wi-Fi or Ethernet interface.
Example:
text
COPIED!
3: wlp0s20f3: ...inet 192.168.1.42/24subho/
Install rsync if needed
Ubuntu:
bash
COPIED!
sudo apt install rsync
Arch:
bash
COPIED!
sudo pacman -S rsync
Large transfers with rsync
Standard transfer
bash
COPIED!
rsync -avh --progress myfolder/ subho@192.168.1.42:/home/subho/myfolder/
Transfer with compression
bash
COPIED!
rsync -avzh --progress myfolder/ subho@192.168.1.42:/home/subho/myfolder/
-z enables compression during transfer.
Useful for:
- slower Wi-Fi
- remote transfers
- text/code/compressible files
Usually NOT useful for:
.mp4.mkv.zip.jpg- other already-compressed files
Compression may slightly increase CPU usage.
Both commands:
- copy files
- preserve source files
- overwrite changed destination files automatically
- skip identical files
Options:
-aarchive mode-vverbose-zcompress during transfer-hhuman readable--progressshow progress
Preview changes without modifying anything
bash
COPIED!
rsync -avhn --progress myfolder/ subho@192.168.1.42:/home/subho/myfolder/
-n means dry run.
Prevent overwriting existing destination files
bash
COPIED!
rsync -avh --ignore-existing myfolder/ subho@192.168.1.42:/home/subho/myfolder/
Move files instead of copying
bash
COPIED!
rsync -avh --progress --remove-source-files myfolder/ subho@192.168.1.42:/home/subho/myfolder/
With compression:
bash
COPIED!
rsync -avzh --progress --remove-source-files myfolder/ subho@192.168.1.42:/home/subho/myfolder/
This:
- copies files to Arch
- deletes transferred source files
- does NOT remove empty source directories
Remove leftover empty directories:
bash
COPIED!
find myfolder -type d -empty -delete
Troubleshooting
Test network connectivity
From Ubuntu:
bash
COPIED!
ping 192.168.1.42
Check SSH server again
On Arch:
bash
COPIED!
systemctl status sshd
Firewall issues
Temporarily allow SSH:
bash
COPIED!
sudo ufw allow 22/tcp
or disable firewall temporarily for testing.
Optional: Passwordless login
Generate SSH key on Ubuntu:
bash
COPIED!
ssh-keygen
Copy key to Arch:
bash
COPIED!
ssh-copy-id subho@192.168.1.42
After this:
- no password prompts
- easier SCP/rsync usage