#!/bin/bash # # rsync-check.sh set -- $SSH_ORIGINAL_COMMAND cmd="$1"; shift case "$cmd" in scp|rsync) exec "$cmd" "$@" ;; *) echo "ERROR: request not permitted" ;; esac