Run script for each ssh login

2013-11-13 Thread Antonio Paiva
Hi everyone, I would like to set up an ssh server such that, everytime someone tries to connect to it, a script will be run to control certain aspects of the connection. More specifically, I want to check if certain conditions are met and, if they are not, refuse/abort the connection. I found

Re: Run script for each ssh login

2013-11-13 Thread emmanuel segura
kill -9 $$ 2013/11/13 Antonio Paiva arpa...@sci.utah.edu Hi everyone, I would like to set up an ssh server such that, everytime someone tries to connect to it, a script will be run to control certain aspects of the connection. More specifically, I want to check if certain conditions are

Re: Run script for each ssh login

2013-11-13 Thread emmanuel segura
sorry for the sort answer, why you don't use /etc/profile for archive what you want? 2013/11/13 emmanuel segura emi2f...@gmail.com kill -9 $$ 2013/11/13 Antonio Paiva arpa...@sci.utah.edu Hi everyone, I would like to set up an ssh server such that, everytime someone tries to connect to

Re: Run script for each ssh login

2013-11-13 Thread Lars Noodén
You could try making a script and then calling it with ForceCommand. Have it fail to abort the session or call a shell to allow it to proceed. Regards, /Lars -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact

Re: Run script for each ssh login

2013-11-13 Thread David Guntner
Antonio Paiva grabbed a keyboard and wrote: Hi everyone, I would like to set up an ssh server such that, everytime someone tries to connect to it, a script will be run to control certain aspects of the connection. More specifically, I want to check if certain conditions are met and, if they

Re: Run script for each ssh login

2013-11-13 Thread Antonio Paiva
The ForceCommand does exactly what I need. I wonder why I missed it when I looked at the documentation... Thank you all. -Antonio On Wed, Nov 13, 2013 at 2:04 PM, David Guntner da...@guntner.com wrote: Antonio Paiva grabbed a keyboard and wrote: Hi everyone, I would like to set up an