I don’t have any plans for server support at the moment, though a lot of the code would be transferable. Ideally, I’d like to get it onto an esp32 or other wireless microcontroller.
It’s very rough, but I’ve added a basic server example.
Right now, I’m just concerned with the protocol. The “msshd” example in the repo only handles a single connection at a time and just echoes back what it receives. It handles public key and password auth via events to the app code where it can make a decision - but right now just lets anyone with any key connect.
Opening up a real pty and shell would certainly be possible, but not something I’d recommend anyone does due to the immaturity of this project.
How do you imagine connecting an existing app to an ssh server?
Would you want the server to fork-exec a separate app via the OS, or to link existing code with the sshd’s select() loop? Or perhaps to start a thread with your code and communicate via file descriptors?
I would want to drive MisshodServer at the IO layer level using my own async IO capabilities. Whatever forking or thread spawning I need I would like to do myself.
afaict, this is how misshod is designed to be used already, which is perfect.