我已經在本地和遠程之間設置了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
所以我發佈了這個答案,你可以接受。 –