On a recent penetration test it was identified that the rbash restricted shell we use could be escaped by simply forcing allocation of a pseudo terminal.
ssh -i id_rsa_key user@hostname -t "bash --noprofile"
I have done a fair amount of research and haven't been able to find anything regarding how to prevent this via an ssh config or other process. Any suggestions on how to lock this down would be greatly appreciated.