2023-06-21

How to rsync over ssh between termux on android and pc

rsync is software for syncing between different source, the advantage using rsync is it automatically compare, replace, delete etc. and also it can be use for copying file over the network. if you using wifi 6 or above it will speedup the file transfer speed rather than using usb mtp.


On Network

1. Connect your phone using wifi or wifi hotspot.

2. Make sure you know the ip from each device. check using 'ifconfig' 'ip addr' 'ipconfig' etc.


On Phone

$ pkg update

$ termux-setup-storage

$ pkg install nmap openssh rsync

$ whoami # to see username

$ passwd {username} # to set password to the username

$ sshd # to active ssh service

$ nmap localhost # to see port


On Pc

rsync --ignore-existing -avzhc --delete --progress -e 'ssh -p 8022' '/home/adminv/Music/Miix/Mix Mine/' 'ssh u0_a271@192.168.89.68:~/storage/music/Mix Mine/'

Just adjust the red and the blue one as your need. it can be 2 way, rsync to pc or rsync to phone.

Share:

0 comments:

Post a Comment