Are there OpenSSH library coding examples

ron flory ron.flory at adtran.com
Fri May 26 06:28:32 EST 2006


>> On Tue, 23 May 2006, ron flory wrote:
>>
>>> Hi-
>>>
>>>   Apologies in advance if this is off-topic, but I've been
>>> unable to find any coding or usage examples on how to open a
>>> SSH client to a remote server.  I'll happily RTFM if I can just
>>> find the FM (!).  The client environment is x86 Linux 2.6.x,
>>> the remote SSH servers will be on proprietary embedded devices.
>> It would be nice to offer a SSH client API, but we don't have one
>> yet. libssh.a certainly isn't a client API, just an internal thing
>> for functions shared between the various tools.

Andrew wrote:
> Ron, I might suggest libssh2 [ http://libssh2.sourceforge.net ].
> I haven't used any of their code yet, as I am considering trying to 
> hack together a library from the OpenSSH code base. 

  Thanks for the tip, libssh2 is just what I was looking for...

  The API docs are better than most but a simple coding example would
be nice.  They have a functional rather than socket interface so one
must make explicit calls to send/rcv data, but if you can work around
that it seems to be quite usable and straight-forward.

  Another thing would be nice- merge this lib/API into OpenSSH
(hint, hint) ;)

ron




More information about the openssh-unix-dev mailing list