On Mon, Jun 25, 2018 at 1:16 AM Oliver.Zhan <zhangjianp...@hikvision.com> wrote:
> can guacamole record the commands used by the remote users for linux ? > > > > like this : > > 1 > > exit > > admin > > centos-10.65.128.6 > > sysadmin > > 2018-06-19 18:05:42 > > 2 > > sftp > > admin > > centos-10.65.128.6 > > sysadmin > > 2018-06-19 18:05:25 > > 3 > > sudo -i > > admin > > centos-10.65.128.6 > > sysadmin > > 2018-06-19 18:04:09 > > > Guacamole can be configured to record the sessions, both graphically (for RDP and VNC), and text-based (for Telnet and SSH), such that a history could be retrieved. Graphical sessions can also be run through the guaclog binary, which can provide you with a log of mouse movements and keystrokes. However, there is no utility available today in the Guacamole source code that would give you the output that you have above - you would need to write your own utility to parse the recordings and then generate the list from above. It would be slightly challenging to do this in a reliable way - you'd have to figure out how to determine when the user enters a command (presses return, for example), and how to determine when that particular keystroke is actually the execution of a command verses responding to a prompt, etc. I'll point out that, while Guacamole certainly has some components that would give you the ability to make this happen, that's not its primary role, and you'd probably be better off implementing something at the O/S level to tell you this and using that information rather than trying to get Guacamole to do this for you. For example, the auditd framework available in most Linux distributions can detect and log execution events. Usually that's done via syslog, so you can take that log output and send it to a file, or to a central syslog server, or perhaps even a ELK stack, and get the sort of succinct graphical representation you're looking for. -Nick