If (ssh_message_type(msg) = SSH_REQUEST_CHANNEL & ssh_message_subtype(msg) = SSH_CHANNEL_REQUEST_SUBSYSTEM) SftpChannel = ssh_message_channel_request_open_reply_accept(msg) Printf(" Got channel open request, opening new channel for sftp\n") If (ssh_message_type(msg) = SSH_REQUEST_CHANNEL_OPEN & ssh_message_subtype(msg) = SSH_CHANNEL_SESSION) Implementing this worked for me: while ((msg = ssh_message_get(session))) To enable them, you have to use #define WITH_SERVER.ĭespite the comment on the doc that you don't have to handle channels yourself, you do have to open a new channel on the server side for the SFTP communication. I found on the thread of this question that libssh/sftp.h does have separate functions for the server at the very end. For all who are struggling as well, I finally found the solution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |