Question about accepting/starting netconf session with authenticated ssh channel
I'm currently migrating a project from libnetconf to libnetconf2. In libnetconf the function nc_session_accept_libssh_channel was capable of starting a netconf session with an authenticated libssh ssh channel. This seems to have been removed in libnetconf2, and I cannot find anything that accomplishes the same thing.
Is there one and I am just missing it, or was this functionality removed and expected to be implemented with nc_accept_inout?
Thank you for your time!
Hi,
you mean nc_session_accept_ssh_channel()? I do not know why this function should be hard to find.
Regards, Michal
Hi, I did see that function, but I didn't think it accomplished the same thing.
In the original libnetconf nc_session_accept_libssh_channel() took an ssh_channel and returned a netconf session.
From what I understand from the libnetconf2 documentation the function nc_session_accept_ssh_channel() is used to create additional netconf sessions using one that has already been established?
Oh, you have created the SSH channel yourself? Then yes, nc_accept_inout() is the function you want to use but this way you are not using maybe half of libnetconf2 if not even more. It really is better to use nc_ps_poll() and functions around that, if you can.
Regards, Michal