[待補] Rsync over SSH

No Comments

Rsync over SSH

A: 被備援(丟資料) libil (Trustix Linux 3.0.5)
B: 做備援(收資料) libcy (Trustix Linux 3.0.5)

準備工作
vi /etc/ssh/sshd_config
把 PermitRoot 改成 foced-command-only

libcy 啟動 rsync 服務(不用在防火牆上開 873的port)

主機帳戶以root執行
(用其他的, 應該也行, 因為 /etc/rsync.conf 裡面會定義 uid & gid)

先到 libcy 上

安裝 rsync-server 軟體
swup –install rsync-server rsync

# vi /etc/rsync.conf
—- top of the file —-
transfer logging = yes
log file = /var/log/rsync/rsync
pid file = /var/run/rsyncd.pid
timeout = 600

[libil]
path = /home/rsync
# auth users = rsync
auth users = linux
uid = root
gid = root
read only = no
secrets file = /etc/rsyncd.secrets
—- bottom of the file —-

# vi /etc/rsyncd.secrets
—- top of the file —-
root:pass4libil
—- bottom of the file —-

service rsyncd restart

Leave a Reply

Share via
Copy link