报错信息:
# rsync -rav -e 'ssh -p 36000' /tmp/test/ www@192.168.0.183:/tmp/test/
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(171) [sender=3.0.6]
[root@localhost logs]# rsync -rav -e 'ssh -p 36000' /tmp/test/ www@192.168.0.183:/tmp/test/
sending incremental file list
sent 128 bytes received 13 bytes 282.00 bytes/sec
total size is 0 speedup is 0.00
问题分析:同步用户www没有登录权限
# grep www /etc/passwd
www:x:300:300::/home/www:/sbin/nologin
解决:将www用户改为可登录用户
# grep www /etc/passwd
www:x:300:300::/home/www:/bin/bash
网友评论