OpenSSH linkable library

Damien Miller djm at mindrot.org
Thu Sep 20 10:01:06 EST 2001


On Wed, 19 Sep 2001, Eric Huss wrote:

> > > Has anyone considered making a linkable library of the OpenSSH code so
> > > that one could programatically interact with ssh?  Or is there some other
> > > method to accomplish this?
> >
> > depends on what do you want to use it for.
> 
> Well, specifically I'd like to have a server periodically scp files.
> Under normal conditions, it will be OK because it will use DSA keys.  But
> there are some exceptions, such as if the remote host's key changes and
> the user doesn't update the server.  I don't want to have to do TTY
> emulation in order to parse the output from scp.  Also, what scp prints
> out may not be consistent from version to version.
> 
> I'd like to easily detect exceptions and be able to relay the exact
> problem to the user.
> 
> It would also be nice to be able to track the progress of the transfer.  I
> would rather not recreate all the code in scp.c.

You probably want to use the sftp protocol for this. You can reuse the
connection infrastrcuture from sftp.c and the protocol routines in 
sftp-client.c and sftp-common.c.

-d

-- 
| Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's 
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer




More information about the openssh-unix-dev mailing list