Skip to content

View History

Logged in user history from shell

Logged in user can view history by first looking up corresponding login ssh session and viewing commands for that session, as shown below.

johndoe> sessions 192.168.2.77                                                                                                              
SSH Session id                   : Start time               : Host            : SSH User        : End time                 
acd6a6d7f4624479b9c846d1f90e90eb : 2019-04-11 16:01:55 UTC  : 192.168.2.77    : wideva          : 2019-04-11 16:03:51 UTC  
johndoe> commands acd6a6d7f4624479b9c846d1f90e90eb                                                                                          
Time                     : Host            : Command  
2019-04-11 16:03:51 UTC  : 192.168.2.77    : logout 
2019-04-11 16:03:21 UTC  : 192.168.2.77    : passwd 
2019-04-11 16:03:15 UTC  : 192.168.2.77    : # can you see this too 
2019-04-11 16:03:05 UTC  : 192.168.2.77    : echo can you see this command ? 
2019-04-11 16:02:07 UTC  : 192.168.2.77    : free -m 
2019-04-11 16:02:05 UTC  : 192.168.2.77    : uptime 

View Command from Control Panel

View command for a host

Go to host list, and click on Commands to see all commands for that host.

Command History for Host

View command by a particular user

Go to Users list page and click on Sessions to see a list of ssh sessions, and then click on View commands to see list of commands by that user for that specific ssh session. Vew Commands

Command History for Host

View logins to SSHTrail

From shell

Logged in user can view previous logins, using command last

johndoe> last                                                                                                                               
Login Session Id                 : Start time               : Remote IP       : End time                
455fe15728454d31ac95e5bda4885556 : 2019-04-11 16:01:16 UTC  : 192.168.2.77    : Current                 
fae01330018c4002bed2e2870b470628 : 2019-04-11 12:58:27 UTC  : 192.168.2.77    : 2019-04-11 16:01:00 UTC 
johndoe>  

From Control Panel

From Users page, click on Logins corresponding to user, for which we want to find out successfull login attempts.

User logins

Play full Login session

You can view full session of a user, by downloading asciinema cast file. You can also view currently active session, upto to the point of download. In login sessions page in control panel as seen above, download recording by clicking on Download button.

To view the recording, you need asciinema installed. To view recording, run asciinema play

asciinema  play  ~/Downloads/f6e0dbcd385546c4aa65b303b14a5aeb.cast