2017-06-17 5:56 GMT+02:00 [email protected] <[email protected]>: > > Hi All, > I have been trying to understand and write a simple sftp server using > libssh. I have had some success setting up the ssh channels. Basically my
You don't have to use libssh to write a (simple) sftp server. The server is launched by openssh as a "subsystem", and openssh takes care for the encryption etc. Your server only has to listen to stdin and write responses to stdout and stderr. See the sshd_config, paramtere Subsystem. At this moment I'm writing a versatile (I hope!) sftpserver listning to a socket, and clients can connect using the streamlocal channel (unix socket forwarding). This is better than a subsystem, especially when having a lot of clients. Stef
