[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help-libssh




Hi,

I would like to use libssh to execute 
remote command.

In my program, I get problem at 
 rc = ssh_channel_open_session(channel);

The function ssh_channel_open_session do
not return me SSH_OK.

What could be the problem.

I use Debian 8.x.

Please help.

Thanks,
S.Gopinath


 ssh_channel channel;
 int rc;
 char buffer[256];

 int nbytes;


 channel = ssh_channel_new(session);

 if(channel=NULL) { return SSH_ERROR; }


 rc = ssh_channel_open_session(channel);

 if(rc != SSH_OK)
 {
 ssh_channel_free(channel);
 printf("Error\n");
 return rc;
 }

Follow-Ups:
Re: Help-libsshAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org