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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham 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!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!xmission!nnrp.xmission!adam.ruth From: Adam Ruth Newsgroups: comp.lang.ada Subject: Re: SSH Sessions ? Date: Mon, 09 Aug 2004 22:32:33 -0600 Organization: InterCation, inc. Message-ID: References: <49dc98cf.0408091032.508f09df@posting.google.com> NNTP-Posting-Host: 166.70.154.50 X-Trace: news.xmission.com 1092112352 6154 166.70.154.50 (10 Aug 2004 04:32:32 GMT) X-Complaints-To: abuse@xmission.com NNTP-Posting-Date: Tue, 10 Aug 2004 04:32:32 +0000 (UTC) User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X) Xref: g2news1.google.com comp.lang.ada:2642 Date: 2004-08-09T22:32:33-06:00 List-Id: In article , Georg Bauhaus wrote: > Chris Humphries wrote: > : Has anyone written or have a way to do SSH sessions via ADA? > : > : Looking to: 1) connect to servers from having the username, password, and > : ip > : 2) execute one command > : 3) save the text/status returned from the command > > Not exactly like ssh, but would SOAP via HTTPS be an option? > http://libre.act-europe.fr/aws/aws-2.0p.html#Using%20SOAP > > > -- Georg I'm doing this very thing myself, and I'm just using the command line version of ssh. I execute it using the system call (the c library system(const char *command) call). It's pretty straight forward, since I don't need to do much that's complicated, just execute a remote command line program as though it was being executed on my local command line. 2 caveats. First, I use public key authentication instead of a password. Second, I pipe my error stream to standard output (using 2>&1), so stderr and stdout are all mucnched together. But that works fine for what I'm doing (it's simpler than using one of the popen commands). If you'd like some more details, I'll be glad to offer them. -- -- Adam Ruth adamruth at mac dot com