> Ok. I read about channel and session in libssh. So, if i understood
> correctly, one channel for one command.
That is not correct.
Also, please note that this project is called libssh2.
There are several different channel types. I think you need to study
the SSH RFCs in order to understand the SSH protocol correctly. They
are very easy to read. They are linked from here:
Study RFC 4251 and 4253 to understand channels.
> But this way leads me to LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED when
> call libssh2_channel_exec(..)
> So, what else i don't understand
You need to understand exactly what a channel means, currently you
don't, and it means that you can not use libssh2 (or any other SSH
library) in very good ways.
You must of course also understand in detail how the server side
functions and all relevant details about what happens when a user
logs into a UNIX-like system, specifically how the user's shell is
involved. There is no RFC for this, that's more about experience in
the systems administration domain. I guess there may be some books
about it though, but unfortunately I can't make any recommendations.
Received on 2012-04-12