newbie wants to compile SCP into his own application
Ben Lindstrom
mouring at etoh.eviladmin.org
Mon Feb 24 12:24:15 EST 2003
No clue.. but I think the code in the tree is pretty clear on the subject.
- Ben
On Mon, 24 Feb 2003 aplumb at westpac.com.au wrote:
>
> OK, I'll look into using sftp instead.... do you (or anyone else) have
> sample code for integrating sftp ?
>
>
> Andrew.
>
>
>
>
>
> Ben Lindstrom
> <mouring at etoh.evil To: aplumb at westpac.com.au
> admin.org> cc: openssh-unix-dev at mindrot.org
> Subject: Re: newbie wants to compile SCP into his own application
> 20/02/2003 10:07
>
>
>
>
>
>
>
> First off I suggest you look at sftp rather than scp. There are less
> integration issues and I believe you'll be more happy with the results.
>
> Second, you just can just add scp.c and libopenbsd-compat.a into your code
> and think you don't have nay more external dependances. Just keep in mind
> scp forks to call ssh (same is true with sftp).
>
> But in general, sftp code is much friendlier for integrating since it was
> designed for that reason. scp (for how wonderful it is) is really a hack
> on a hack on a hack.=)
>
> - Ben
>
>
>
> On Thu, 20 Feb 2003 aplumb at westpac.com.au wrote:
>
> > Hi all,
> >
> > I have seen in the OpenSSH source that the scp executable is built by
> > compiling scp.c and linking with libopenbsd-compat.a and libssh.a.
> (Correct
> > me here if I'm wrong)
> >
> > My question is, can I make this a module in my own application by using
> the
> > scp.c source and ilnking the libraries mentioned above ? The reason is, I
> > want to perform an SCP from my application, but I don't want to execute
> the
> > external command line utility "scp". I want to be able to get a return
> > value to indicate success or failure and handle this in my app.
> >
> > Thanks,
> >
> > Andrew Plumb.
> >
>
>
>
More information about the openssh-unix-dev
mailing list