#!/usr/local/bin/bash # special shell to allow only rsync or sftp # created for FreeBSD ... tweak paths for Linux. # Rudy # Log it /usr/bin/logger -t dummysh "[$USER] [$SSH_CLIENT] [$1 $2]" if (( $# == 0 )) then printf "%s\n" "shell access is disabled. Contact MonkeyBrains.net." exit 1 elif (( $# == 2 )) && [[ $1 == "-c" ]] && [[ $2 == "rsync --server"* || $2 == "/usr/libexec/sftp-server" || $2 == "scp "* ]] then exec $2 fi