comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Ruth <adam.ruth@mac.com>
Subject: Re: SSH Sessions ?
Date: Mon, 09 Aug 2004 22:32:33 -0600
Date: 2004-08-09T22:32:33-06:00	[thread overview]
Message-ID: <adam.ruth-3053E7.22323309082004@localhost> (raw)
In-Reply-To: cf8iab$qav$1@a1-hrz.uni-duisburg.de

In article <cf8iab$qav$1@a1-hrz.uni-duisburg.de>,
 Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de> wrote:

> Chris Humphries <chris@unixfu.net> 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



  parent reply	other threads:[~2004-08-10  4:32 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
2004-08-11  6:57     ` Andreas Almroth
2004-08-10  4:32   ` Adam Ruth [this message]
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