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 code so far (without error checking for readability) looks like the following pseudocode :
ssh_bind_new(); ssh_new(); ssh_bind_options_set(...port); ssh_bind_options_set(...key); ssh_bind_listen(); ssh_bind_accept(); ssh_handle_key_exchange(); authenticate(); <snip> /* I have snipped out the code * where I set up the channel */ sftp_server_new(); sftp_server_init(); Now once I have done the sftp_server_init() I am unsure what to do or where to go from here. The API documentation doesn't give much help for sftp servers. I would like to basically begin handling client requests at this point (i.e. user types "put ..." or "ls -al"). Are there any examples for this. The tutorial only really seems to show what needs to be done when writing a client application. Thanks for any examples or help!
