Hello, My name is Tom Uffner and I am an expert UNIX / Linux Administrator and programmer.
There are several ways that I could approach this project: If the single command(s) that you want to allow these users are suitable, that is, they don't allow any trickery like shell escapes or ability to execute other commands and they don't require any arguments, then I could simply the command as the user's shell ... no need for even an exit. just log in and the command runs then exits automatically leaving its output in the ssh window.
If that is not acceptable, or not possible, I would install an open-source restricted shell (the name of which I will reveal when hired) and configure it to only execute your chosen command and the builtin command "exit".
I will of course provide source & documentation if desired.
Thank you,
Tom