3 ms·
You don't even need a jail for that. Just add those lines to the end of /etc/ssh/sshd_config: Match User pi AcceptEnv ForceCommand echo 'To e
by aexaey 10y ago
You don't even need a jail for that. Just add those lines to the end of /etc/ssh/sshd_config:
Match User pi
AcceptEnv
ForceCommand echo 'To enable SSH, do this and that'
EDIT: added an explicit empty "AcceptEnv".
- tinus_hn 10y agoAllowing untrusted users to run programs is a recipe for disaster. Forcecommand runs its commands using a login shell that gets a lot of information from the connecting user. It wouldn't be the first time someone found an obscure environment variable that turns this into a remote shell.
- deleted 10y ago[deleted]