Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Rexx and ssh-agent: How can I get ssh to work from a Rexx programwithout asking for a PW?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 1st April 08:29
phil hobbs
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx programwithout asking for a PW?


I'm in the very last stages of porting a big electromagnetic simulator
to a linux cluster. To distribute the various jobs around the cluster
nodes, I'm trying to use a Rexx program. This program generates a
little shell script for each cluster host, puts them on a NFS share
where they're visible to all the cluster hosts, and then calls ssh N
times to run it, something like this:

do i= 1 to N
'ssh me@mycluster /share/someplace/host'N'.sh &'
end

The problem is that even though I have ssh-agent running, it doesn't
work from inside the Rexx program--I get asked for all the passwords,
and since the ssh instances are in the background, the program just
waits and waits. This happens on both ooRexx and Regina (x86_64 linux).

Is there a way to get ssh-agent working inside a Rexx script?

Thanks,

Phil Hobbs
  Reply With Quote


  sponsored links


2 1st April 12:28
phil hobbs
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx programwithout asking for a PW?


Never mind. Pilot error.

Cheers,

Phil Hobbs
  Reply With Quote
3 1st April 12:28
gerard schildberger
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx program without asking for a PW?


| to a linux cluster. To distribute the various jobs around the cluster
| nodes, I'm trying to use a Rexx program. This program generates a
| little shell script for each cluster host, puts them on a NFS share
| where they're visible to all the cluster hosts, and then calls ssh N
| times to run it, something like this:
|
| do i= 1 to N
| 'ssh me@mycluster /share/someplace/host'N'.sh &'
-------------------------------------------- I ----- ?

Did you intend to use the DO loop index here instead of N ?
__________________________________________________ ______Gerard S.

| end
|
| The problem is that even though I have ssh-agent running, it doesn't
| work from inside the Rexx program--I get asked for all the passwords,
| and since the ssh instances are in the background, the program just
| waits and waits. This happens on both ooRexx and Regina (x86_64 linux).
|
| Is there a way to get ssh-agent working inside a Rexx script?
  Reply With Quote
4 1st April 12:28
phil hobbs
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx programwithout asking for a PW?


No, that was just a 4 AM typo, not a cut'n'paste. The problem was that
the cluster configuration is mildly broken--the home directories for the
normal user accounts don't exist on the nodes, so there's no .ssh
directory, so there's no authorized_keys file, so ssh asks for
passwords. It works fine as root--not a long term solution obviously,
but at least it isn't the Rexx program's fault.

Newsgroups have this great placebo effect--about 30% of the time I
figure it out soon after posting.....oh, well.

Cheers,

Phil Hobbs
  Reply With Quote
5 1st April 12:28
shmuel (seymour j.) metz
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx program without asking for a PW?


In <45C8E5F1.7040509@SpamMeSenseless.pergamos.net>, on 02/06/2007
at 03:32 PM, Phil Hobbs <pcdh@SpamMeSenseless.pergamos.net> said:


I get the same effect when I ask someone to spot a bug in my code and
start explaining what it's supposed to do. I suspect that the
phenomenon is universal.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org
  Reply With Quote
6 1st April 12:28
allodoxaphobia
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx program without asking for a PW?


Several hundred years ago I taught Basic programming classes (among
others) at a state college. Sadly, few of the students would arrive at
college with any problem solving skills.

I told them -- that when they were stumped on a programming assignment
-- to sit down and explain their program to their dog. (They all
seemed to have had a dog.) Many of them remarked to me that it *really*
did work. A few told me that years later -- post graduation.

I call it Cerebral Percolation.

Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
*** Killfiling google posts: <http://jonz.net/ng.htm>
  Reply With Quote
7 1st April 12:28
bob martin
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx program without asking for a PW?


A colleague and I called it "talking to the wall" - we would appear to be listening
but not actually bother.
  Reply With Quote
8 3rd April 03:19
tom liotta
External User
 
Posts: 1
Default Rexx and ssh-agent: How can I get ssh to work from a Rexx programwithout asking for a PW?


AFAIK, it simply comes from forcing a different mental paradigm. You
must verbalize each detail and you see the error.

When looking at it by yourself, you have a preconceived notion about the
piece that's in error -- you "know" that it's the right data type or
that the semi-colon is in the right place or that the variable was
properly initialized, whatever.

Because you /know/ it, you cannot mentally question it. But when
explaining to someone else, you put all of the details into words. When
you hit the problem spot and start to translate what you see into words,
the flaw is obvious.

Just my personal way of making sense of it.

--
Tom Liotta
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666