LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Prevent certain groups/users from running commands, but give them an ssh terminal (https://www.linuxquestions.org/questions/linux-server-73/prevent-certain-groups-users-from-running-commands-but-give-them-an-ssh-terminal-933523/)

piman 03-08-2012 09:12 PM

Prevent certain groups/users from running commands, but give them an ssh terminal
 
Hello,
I need to prevent a group of users (ssh-tun) from executing any commands. They still need to have ssh access so that they can use an ssh tunnel, but without being able to do anything to my ec2 box. Any suggestions or solutions would be much appreciated!
Thank you in advance!

EricTRA 03-08-2012 09:36 PM

Hello,

If you use key based authentication you could use the 'Forced command' option in association with a user's key. You could stipulate one command or point to a script where you provide 'enabled' commands. I don't know if it would still allow tunneling, you'll need to try that. Have a look at this site for some detail.

Kind regards,

Eric

piman 03-09-2012 09:00 AM

Thank you for the article, i figured it out using that site. I wrote a copied their script also, to give user the date, and I can add anything else I want them to be able to do. The key to making this work is to put 'command="blank/blank"' on the same line, before the key that you want it to apply to

EricTRA 03-09-2012 01:07 PM

Hi,

Glad it was of help. If you consider your problem solved then please mark this thread as such.

Kind regards,

Eric


All times are GMT -5. The time now is 04:37 PM.