我已经在本地和远程之间设置了ssh密钥对。ssh密钥对连接工作,但通过ssh密钥对rsyncd要求输入密码
ssh登录工作不要求密码
[email protected] ~$ssh -v remote
..
debug1: Authentications that can continue: publickey..
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
..
debug1: Entering interactive session.
[email protected] ~$
的rsync通过ssh非rsyncd的模式下工作(注意单:),但问题是,rsyncd.conf在该模式中没有谘询。
[email protected] ~/bin$rsync -av -e "ssh -v -l [email protected]" [email protected]:/dir
..
debug1: Authentications that can continue: publickey..
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/punkish/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
..
debug1: Entering interactive session.
debug1: Sending command: rsync --server --sender -vlogDtpre.iLs . /dir
receiving file list ... done
..
[email protected] ~/bin$
rsync通过ssh在rsyncd模式下失败(请注意双::),并请求密码。
[email protected] ~/bin$rsync -av -e "ssh -v -l [email protected]" [email protected]::module
..
debug1: Authentications that can continue: publickey..
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/punkish/.ssh/id_rsa
debug1: Authentications that can continue: publickey..
debug1: Next authentication method: keyboard-interactive
Password:
我在做什么错?我的目标是在远程机器上使用rsyncd.conf运行rsync。
你确定''l'标志'ssh'在这里吗?我认为它应该是'ssh -l user remote'或'ssh user @ remote'。 –
天哪dangit ......就是这样。改成只是'ssh user @ remote'工作得很好。非常感谢。 – punkish
所以我发布了这个答案,你可以接受。 –