Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. (server)$ cat << EOF >> .ssh/authorized_keys
  2. command="rsync",no-pty,no-port-forwarding (paste your public key here)
  3. EOF
  4.  
  5. (server)$ tail -1 .ssh/authorized_keys
  6. command="rsync",no-pty,no-port-forwarding ssh-rsa AAAAB3..blah..blah..HhcvQ== you@example.com
  7.  
  8. rsync -av -e 'ssh -i ~/.ssh/id_rsa_rsync' local/files* server:
  9.  
  10. # this entry is used for normal logins to "server":
  11. Host server
  12. IdentityFile ~/.ssh/id_rsa
  13.  
  14. # this entry is used for rsyncing to "server" without a passphrase:
  15. Host server-rsync
  16. Hostname server
  17. IdentityFile ~/.ssh/id_rsa_rsync
  18.  
  19. rsync -av local/files* server-rsync:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement