I changed sshd_config to jail users within specific group into their home directory. changed subsystem to sftp internal-sftp and used forcecommand: internal-sftp
However, this prevented the admin user on ubuntu from accessing sftp at all.
How to allow user let's call him 'admin' unrestricted access and not affect ssh privilege? admin uses key authentication.
I searched for documentation on forcecommand and subsystem but couldn't find much.
Currently I have this
#Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp intenal-sftp Match Group somegroup PasswordAuthentication yes ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp