Re: automating ssh connection
From: Bob Rasmussen (ras_at_anzio.com)
Date: Mon, 3 May 2004 12:47:06 -0700 (PDT) To: "Satyanarayana, Dintakurthi" <firstname.lastname@example.org>
On Fri, 30 Apr 2004, 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 ?
> Is there any other alternative that helps in
> establishing ssh connections ? One thing I certainly
> want to do while opening ssh connection is using a
> crypto algorithm (3des/blowfish) of my choice.
> Please suggest any pointers.
First, it would help to know if you are talking about running on a
Unix/Linux system or a Windows system (or something else).
It is not as simple as opening a socket. The authentication and encryption
routines are quite involved.
Your best approach might be to use a forwarded port. That is, have an SSH
connection already in place, with a forwarded port that you can use in
....Bob Rasmussen, President, Rasmussen Software, Inc.
personal e-mail: email@example.com
company e-mail: firstname.lastname@example.org
voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
fax: (US) 503-624-0760