You would absolutely not use openssh server for this. That's a terrible idea.
Pick a library. https://github.com/Eugeny/russh