lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
$ rsync -e ssh -av -l --delete --exclude files/css user@host:/path /path/
Traceback (most recent call last):
File "/usr/local/bin/lshell", line 54, in
main()
File "/usr/local/bin/lshell", line 40, in main
userconf = CheckConfig(args).returnconf()
File "/usr/local/lib/python2.6/dist-packages/lshell/checkconfig.py", line 141, in init
self.check_scp_sftp()
File "/usr/local/lib/python2.6/dist-packages/lshell/checkconfig.py", line 678, in check_scp_sftp
cli = ShellCmd(self.conf, None, None, None, None, \
NameError: global name 'ShellCmd' is not defined
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
$ rsync -e ssh -av -l --delete --exclude files/css user@host:/path /path/ Traceback (most recent call last): File "/usr/local/bin/lshell", line 54, in
main()
File "/usr/local/bin/lshell", line 40, in main
userconf = CheckConfig(args).returnconf()
File "/usr/local/lib/python2.6/dist-packages/lshell/checkconfig.py", line 141, in init
self.check_scp_sftp()
File "/usr/local/lib/python2.6/dist-packages/lshell/checkconfig.py", line 678, in check_scp_sftp
cli = ShellCmd(self.conf, None, None, None, None, \
NameError: global name 'ShellCmd' is not defined
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
Tested with lshell head/master on Debian Squeeze.