S 有效的处理零散文件
v verbose模式
H 保持hard links
上面红色标记是源文件位置 蓝色标记是目的位置
B机器 192.168.1.2
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
65:4a:68:cc:6c:23:2b:04:1a:3c:ee:d7:af:e7:e3:8d root@mailsvr
然后把公匙传到B机的/root/.ssh中:
[root@mailsvr .ssh]# scp /root/.ssh/id_rsa.pub root@192.168.1.2:/root/.ssh/authorized_keys
root@192.168.1.2's password:
id_rsa.pub 100% 219 0.2KB/s 00:00
[root@mailsvr .ssh]#
Last login: Fri Jun 6 09:59:28 2008 from 192.168.1.1
[root@mailsvr ~]#
rysnc一般是通过xinetd进行启动的。
# default: off
# description: The rsync server is a good addition to am ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = yes 修改为disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
uid = root #root用户访问
gid = root #root组用户访问
use chroot = no #不能使用chroot
max connections = 9 #最大连接数
list = yes #允许列出文件清单
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
path = /home/data/ #发布的路径
ignore errors
read only = yes #只读
auth users = root #认证用户为root
secrets file = /etc/sery.pass #密码文件
root:123456
123456 #这里只需要输入服务器端密码文件中定义的密码即可。
本文出自 “在晴朗的天空下” 博客,请务必保留此出处http://chenzhuo.blog.51cto.com/150592/269530
















