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.
When called through ssh, lshell doesn't seem to return the exit code of the command.
# sudo chsh -s /bin/bash test
# ssh test@localhost ls toto
ls: impossible d'accéder à 'toto': Aucun fichier ou dossier de ce type
# echo $?
2
# sudo chsh -s /usr/bin/lshell test
# ssh test@localhost ls toto
ls: impossible d'accéder à 'toto': Aucun fichier ou dossier de ce type
# echo $?
0
This is really annoying, because it forbids to use lshell in many contexts when the return code is an absolute necessity, like nagios check_by_ssh.
I just discovered lshell 2 hours ago, did I miss something?
Hello,
When called through ssh, lshell doesn't seem to return the exit code of the command.
This is really annoying, because it forbids to use lshell in many contexts when the return code is an absolute necessity, like nagios
check_by_ssh
.I just discovered lshell 2 hours ago, did I miss something?
Thanks.