comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: SSH Sessions ?
Date: 09 Aug 2004 22:49:27 -0400
Date: 2004-08-09T22:49:27-04:00	[thread overview]
Message-ID: <mailman.8.1092106184.414.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <49dc98cf.0408091754.b7e53e1@posting.google.com>

chris@unixfu.net (Chris Humphries) writes:

> I would like to use ADA instead of Perl to log into machines on
> our network and check various things (kernel versions [we have our
> own rolled] and security checks) for our clients. I work at an
> isp and webhosting company (of a nice size) and would like to
> login with login information (which i already have in a system
> i wrote) via SSH. Installing software on client computers will
> not be an option :)

Ok. In general, a good idea to use Ada.

> I am new to ADA, but it seems like an awesome language. Much easier
> to read and understand what is going on than most other languages I
> know (including Python).

Yes!

> Would like to move from Perl for most of the core company software
> needs to Ruby or ADA.
> 
> I was told I could use C libraries and call methods from them from
> within ADA. Is this true, 

Yes.

> and if so, could I use the existing openssl/openssh libraries to
> implement SSH in ADA? 

Yes.

> That seems like too much work and why not just use Perl (best tool
> for the job/time?).

That is your call. As you have seen, Perl gets you going faster,
because a lot of libraries already have Perl bindings (other people
have already done the work). But it's harder to maintain in the long
run.

You can try to run the command line ssh from within Ada, using the
GNAT.Expect package, or GNAT.Os_Lib.Spawn. You can capture the output
and parse it, using GNAT.Regexp or GNAT.Spitbol or just
Ada.Strings.Fixed. That might still be better than Perl.

If you do decide to write Ada bindings to the C ssh libraries, be sure
to post them here, or contribute them to the OpenSSH code repository.
Then we can take advantage of your work :).

-- 
-- Stephe




  reply	other threads:[~2004-08-10  2:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 18:32 SSH Sessions ? Chris Humphries
2004-08-09 19:12 ` Georg Bauhaus
2004-08-10  1:54   ` Chris Humphries
2004-08-10  2:49     ` Stephen Leake [this message]
2004-08-11  6:57     ` Andreas Almroth
2004-08-10  4:32   ` Adam Ruth
2004-08-10 12:58     ` Marc A. Criley
2004-08-11 13:35       ` Chris Humphries
2004-08-13 11:48       ` Using Jim Rogers' "Ada Binding to Pipes"? (Was: SSH Sessions?) Jacob Sparre Andersen
2004-08-13 17:44         ` Marc A. Criley
2004-08-14 18:45           ` James E. Hopper
2004-08-17 15:29             ` Using Jim Rogers' "Ada Binding to Pipes"? Jacob Sparre Andersen
2004-08-18  1:15               ` James E. Hopper
2004-08-16 16:28           ` Using Jim Rogers' "Ada Binding to Pipes"? (Was: SSH Sessions?) Anh_Vo
2004-08-17 15:28             ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox