Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. from="192.0.2.*",command="/root/limit-rsnap" ssh-rsa AAAAB3N...
  2.  
  3. #!/bin/bash
  4.  
  5. shopt -s extglob
  6.  
  7. test -n "$SSH_ORIGINAL_COMMAND" || exit 1
  8.  
  9. case "$SSH_ORIGINAL_COMMAND" in
  10. 'rsync --server --sender -'+([vnlHogDtprRxe.isfLS])' --numeric-ids . '*)
  11. RSYNCPATH="${SSH_ORIGINAL_COMMAND#rsync --server --sender -+([vnlHogDtprRxe.isfLS]) --numeric-ids . }"
  12. test -e "$RSYNCPATH" && exec $SSH_ORIGINAL_COMMAND || exit 1
  13. ;;
  14. *)
  15. exit 1
  16. ;;
  17. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement