Are there OpenSSH library coding examples

Daniel Kahn Gillmor dkg-openssh.com at fifthhorseman.net
Wed May 24 07:06:23 EST 2006


Hi Ron--

On May 23, ron.flory at adtran.com said:

 > I need to extend this C++ program to also support communication to
 > remote servers over SSH.  I would prefer to not 'hook into' other
 > commandline applications.  Is this a practical exercise?

I believe the current feeling is that you should, in fact, hook into
the other commandline applications.  Interacting with the openssh
tools as separate processes (using fork/exec, sockets, stdio, etc) is
preferred to trying to link libssh.a (or other chunks of openssh) into
your application directly.  For example:

  http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=114721160324354&w=2

The folks on this list will probably be better able to give you advice
if you follow that general strategy.  It will also helps you with
future maintenance: you can keep your openssh installation up to date
without worrying about tweaking your own code to match a
potentially-shifting API.  The command-line interface tends to be
stabler than the library calls.

	--dkg




More information about the openssh-unix-dev mailing list