How can I keep a history of activities for chroot'd SSH (not SFTP) users? I've tried:
- created a .sh_history in their home with the proper permissions
- created a custom $HISTFILE in .profile and in its jailed /etc/profile
- exported HISTFILE after logging in.
This is how my Match in sshd_config is:
Match Group sshuser
ChrootDirectory %h
AllowTcpForwarding no
Additional Info: This is in an AIX server and user's default shell is ksh. But I have no problem to switch it to bash if the solution requires it. 'chrooted' /etc/profile and user's ~/.profile is not being executed during chrooted login. It also goes without saying that the jailed home is Write-protected for the user, but the files I mentioned and others necessary for the History have enough perms for the user