Santiago Frequent Contributor.
Frequent Contributor.
66 views

How to send an email notification when a user executes a risky command using ssh relay conection

Hi,

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.

 

Labels (4)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.