Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple scriptlet for parsing incoming SSH commands to either reject if they don't match the desired value or else escalate (via SUDO) if they do match
#! /bin/bash
# Exits if command not rsync.
# Escalates to root via sudo if rsync.
exit 1
/usr/bin/rsync\ --server\ --sender*)
exit 1

This comment has been minimized.

Copy link
Owner Author

commented Sep 17, 2012

"The intention is for bare-metal rsync backups by non-root user SSH in a secure fashion (i.e.; keypair + IP restriction + command restriction). So can run rsync@whateverhost and pull down everything thusly. (This is for rsnapshot in my home env.)"

~ Logos01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.