newbie wants to compile SCP into his own application

Ben Lindstrom mouring at etoh.eviladmin.org
Thu Feb 20 10:07:34 EST 2003


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.
>
>
>
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
>




More information about the openssh-unix-dev mailing list