Re: automating ssh connection
From: Dave Howe (DaveHowe_at_cmn.sharp-uk.co.uk)
To: "Email List: Secure Shell" <email@example.com> Date: Tue, 4 May 2004 17:28:42 +0100
Satyanarayana, Dintakurthi wrote:
> I want to open ssh connection to a remote server from
> a c/C++ program. Once the connection is opened, I want
> to exchange data from within the program itself. I
> guess if we have ssh + socket libraries we can do it
> just like opening a tcp socket and using read, write
> calls to get and send data. Does anyone aware of
> socket library that works with SSH ?
Depends on what you are doing.
if all you want is to open a tunnel automatically, then you could probably
get away with launching ssh as a background process, and killing it once
no longer needed. If however you need to integrate more deeply into ssh,
you are probably better off starting out with the ssh program source and
patching it to make calls to your own code for username, password, and
Commercially, there are SSH libraries that allow you to walk what is
perhaps a more familiar path - but they are non-free.