How to send an email notification when a user executes a risky command using ssh relay conection
I want to notify a administrator of a server when a user login to a machine usign a ssh relay connection and tries to excecute a risky command like rm or rmdir.
Note: Rigth now i dont want to rectrict the command or disconect the session although i know that can't be done if the user is usign a ssh relay connection.
Please let me know if this is posible. If it is posible can you show me the steps to do this and if i can do the same for Windows machines and databases like oracle and sql?
- I'm using PAM 3.5.0
- I have already configured SMTP settings in the PAM Manager host.
Thank you in advance for the help.