From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,59ec34bfa2373410 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: SSH Sessions ? Date: 09 Aug 2004 22:49:27 -0400 Organization: Cuivre, Argent, Or Message-ID: References: <49dc98cf.0408091032.508f09df@posting.google.com> <49dc98cf.0408091754.b7e53e1@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1092106184 42435 212.85.156.195 (10 Aug 2004 02:49:44 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 10 Aug 2004 02:49:44 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <49dc98cf.0408091754.b7e53e1@posting.google.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:2641 Date: 2004-08-09T22:49:27-04:00 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