网络通讯

关注公众号 jb51net

关闭
软件教程 > 网络通讯 >

rsync The --password-file option may only be used when accessing an rsync daemon

脚本之家

The --password-file option may only be used when accessing an rsync daemon.
rsync error: syntax or usage error (code 1) at main.c(1418) [sender=3.1.3]

客户端上传文件执行命令出错,查找资料不得其解,最后发现是冒号的问题。

正确的格式如下

rsync -avz --password-file=/path/to/passwordfile /local/path/ user@remotehost::module_name/path/on/module/

请注意看,remotehost后面是两个冒号,而不是一个,粗心大意少打了一个冒号,浪费时间。