How do you use an identity file with rsync?

前端 未结 6 1848
死守一世寂寞
死守一世寂寞 2020-12-22 20:31

How do you use an identity file with rsync?

This is the syntax I think I should be using with rsync to use an identity file to connect:

rsync -         


        
6条回答
  •  借酒劲吻你
    2020-12-22 21:10

    Use either $HOME

    rsync -avz -e "ssh -p1234  -i \"$HOME/.ssh/1234-identity\"" dir remoteUser@server:
    

    or full path to the key:

    rsync -avz -e "ssh -p1234  -i /home/username/.ssh/1234-identity" dir user@server:
    

    Tested with rsync 3.0.9 on Ubuntu

提交回复
热议问题