Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux rsync:如何向远程端验证用户_Linux_Authentication_Rsync - Fatal编程技术网

Linux rsync:如何向远程端验证用户

Linux rsync:如何向远程端验证用户,linux,authentication,rsync,Linux,Authentication,Rsync,我在写一个使用rsync的脚本。我面临的问题是如何向远程端验证用户。似乎提供密码的唯一方法是使用RSYNC_password env var,或者使用-password file选项。我的想法是,使用-password=之类的东西,您需要使用sshpass来尝试以下命令 sshpass -p password rsync "your remaining command" 如果没有安装sshpass,则安装它。通常rsync使用ssh。使用ssh密钥身份验证。

我在写一个使用rsync的脚本。我面临的问题是如何向远程端验证用户。似乎提供密码的唯一方法是使用RSYNC_password env var,或者使用-password file选项。我的想法是,使用-password=之类的东西,您需要使用sshpass来尝试以下命令

sshpass -p password rsync "your remaining command"

如果没有安装sshpass,则安装它。

通常rsync使用ssh。使用ssh密钥身份验证。