I want a user to ssh and only have access to my CLI. This is currently done by executing a command in .profile, which runs the cli as another user (this is done in sudoers, they can only run the CLI as this user and nothing else). One issue I have is the user can still run commands with shh, say bash, which is something I want to restrict. There's also an archive I want the user to be able to transfer with sftp. I'm thinking I'll just make another user and chroot them so they only have access to that one file. I looked into doing this with the same user but chrooting them while still allowing the to use the CLI and restricting remote ssh commands seems like a nightmare. Sorry if this is confusing, I'm having trouble verbalizing all this and don't have much experience with this type of stuff.
In summary I basically want to:
-Allow a user to ssh, but only have access to my CLI
-Prevent the user from doing whatever else with ssh
-Allow transfer of a diagnostics archive
Anyone have some ideas on the best way to accomplish all this? Please let me know if there's any other information that would be helpful. Thanks!