This repository has been archived on 2023-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-scripts/validate-remote-backup.sh

32 lines
290 B
Bash
Raw Normal View History

2020-05-20 23:57:45 +00:00
#!/bin/bash
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo "Rejected"
;;
*\(*)
echo "Rejected"
;;
*\{*)
echo "Rejected"
;;
*\;*)
echo "Rejected"
;;
*\<*)
echo "Rejected"
;;
*\`*)
echo "Rejected"
;;
*\|*)
echo "Rejected"
;;
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected"
;;
esac