There is a Ubuntu 22 Linux jump server. There are dozens of users in the jump server. Each user logs in to the jump server from their desktop using SSH. Then, from the jump server, the user logs into other servers using SSH. Sometimes they even perform multiple hops from the jump server to reach the destination server. The default shell of each user on the jump server is bash. I need to monitor/log all the commands executed by all users of the jump server on the jump server and on all other destination/hops (accessed from the jump server), and store the logs in the jump server. I think I can write a script in Python and deploy it in the jump server to record the keystrokes and log it. This way, after the user logs into the jump server, every command they execute either at the localhost or at any remote server over SSH shall be logged. The jump server has python version 3.10.12. Please provide a robust step by step implementation of the solution. Also feel free to make suggestions, improvements to my plan/solution such as using an alternative language for python. Let me know if you have a better solution or simply design the solutions and share detailed steps to completely implement the steps in prod
↧