www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Remote using command line

Re: Remote using command line

From: Peter Stuge <peter_at_stuge.se>
Date: Thu, 12 Apr 2012 16:38:29 +0200

Dmitry wrote:
> 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:

http://trac.libssh2.org/wiki/FAQ#WhatistheSSH-2protocol

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.
:\

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-04-12

the libssh2 team