How do i allow users to execute commands via ssh without allocating a psuedo-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/22 23:04 UTC
Read the original article Hit count: 241

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