How do I allow users to execute commands via ssh without allocating a pseudo-terminal

Posted by Dani El on Server Fault See other posts from Server Fault or by Dani El
Published on 2012-10-22T20:23:30Z Indexed on 2012/10/23 11:04 UTC
Read the original article Hit count: 221

Filed under:
|

I need to allow users to run a limited set of commands.

But not to allow them to create interactive sessions.

Just like GitHub does.

If you try to ssh without a command it greetings you and close the session.

I can acquire this by using ForceCommand some-script

But getting in some-script i then need to eval user's input.

Perhaps any other NoTTY-like option in sshd_config?

--- UPDATE ---

i'm looking for a pure SSH / Bash solution, not Perl/Python/etc. hacks.

© Server Fault or respective owner

Related posts about linux

Related posts about ssh