In my code , libssh2_channel_direct_tcpip_ex successfully returns
channel .
while( ( channel = libssh2_channel_direct_tcpip_ex(
session,targethostname , 22 , hostname, 22 ) ) == NULL)
{
rc = libssh2_session_last_error(session,NULL,NULL,0);
if (rc == LIBSSH2_ERROR_EAGAIN)
waitsocket(ConnectSocket, session);
else
break;
}
When I use the channel for below purpose
while( (rc = libssh2_channel_exec(channel, commandline)) ==
LIBSSH2_ERROR_EAGAIN );
I get the rc = -22 i.e. "LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED" .
When I look further , the error is actually coming from packet.c file
from below method
"_libssh2_packet_requirev" as the value of ret in below call is 100 i.e.
"d"
int ret = _libssh2_transport_read(session);
Can you give me hint to explore further into where could I be going
wrong ?
Thanks & Regards,
Ashish Kumar
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-16