ssh key认证rsync同步
A:191.168.0.10
B:191.168.0.11
采用推送方式,由A将文件推送到B
B:191.168.0.11
采用推送方式,由A将文件推送到B
A:
emerge cdssh-keygen -t dsa -b 1024 -f //this-host-rsync-keycp this-host-rsync-* ~/.sshscp this-host-rsync-key.pub [email protected]:/root/.ssh/
B:
emerge rsync cdcd ~/.ssh/cat this-host-rsync-key.pub > authorized_keys vi /etc/rsyncd.conf uid = root gid = root max connections = 10 pid file = /var/run/rsyncd.pid use chroot = yes read only = yes [rsynctest] path = /root/rsync_B comment = test ignore errors read only = no /etc/init.d/rsyncd start
A:
rsync -vzrtopg --delete /root/rsync_A/ 172.28.201.102::rsynctest
顶(0)
踩(0)
- 最新评论