Are there OpenSSH library coding examples
Andrew
andrew.chace at gmail.com
Wed May 24 13:10:58 EST 2006
On Wed, 2006-05-24 at 12:35 +1000, Damien Miller wrote:
> 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.
>
> The only way at present is to open the ssh client as a subprocess.
> This is what scp and sftp do, and it works very well. I suggest that
> you have a look at the sftp.c:connect_to_server() function to see how
> it is done there - it is very straightforward.
>
> -d
Hello,
New to the list, but I had the exact same question.
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.
I haven't checked with anyone on this yet regarding licenses,
developers' projects, etc. It's on my todo list :-).
Also, there is another called libssh
[ http://www.0xbadc0de.be/?part=libssh ]. I think it's considered
'alpha' though.
Hope that is of some help...
-Andrew
More information about the openssh-unix-dev
mailing list