Hi Manfred,

I think the problem here is that you are using passphrases for your keys.
Basically the way X10DT works is that we log into the remote host to
compile stuff using the login information provided in the platform conf.
Then to launch the program, we build a command string, then ssh into the
remote host and simply run that command. If running the command on the
remote host requires an additional password or passphrase (which it might),
then there is no way for X10DT's underlying machinery to provide that, and
this causes the ssh errors. So to make this work you need to be able to ssh
from the remote host to the hosts on the list with simple keys and nothing
else.

In my tests, I found that I needed to clean out the .ssh directory. You
need to make sure that the IPs and the keys of the hosts have not been
replaced, and that the files in .ssh have the right permissions. In that
case, it's best to delete the appropriate entries from .ssh/known_hosts on
the remote host, and make a new connection manually. It's also good to
regenerate a key pair on the remote host and add the public key to the
remote host's .ssh/authorized_keys file.

Please let me know if this works for you.

Thanks,

Mandana

Mandana Vaziri
IBM T. J. Watson Research Center
http://www.research.ibm.com/people/m/mvaziri/




"Kroehnert, Manfred (kroehner)" <manfred.kroehn...@kit.edu> wrote on
09/13/2011 04:47:02 AM:

> From: "Kroehnert, Manfred (kroehner)" <manfred.kroehn...@kit.edu>
> To: Mailing list for users of the X10 programming language <x10-
> us...@lists.sourceforge.net>
> Date: 09/13/2011 04:47 AM
> Subject: Re: [X10-users] Starting a remote X10 program with Eclipse X10DT
>
> Hello Mandana,
>
> first of all, thanks for looking into this issue.
>
> Unfortunately I still have the same problems.
> Here is my setup:
>
> localhost: OS X 10.6.8 (running X10DT)
> p82:       Ubuntu 8.04 (downloaded X10 binaries)
> p75:       Ubuntu 8.04(downloaded X10 binaries)
>
> The computers p82 and p75 share the same home directory mounted via NFS.
>
> The steps I followed for setting up ssh:
>
> 1. add the ssh key to .ssh/authorized_keys on p82 which also makes
> it valid for
> p75
> 2. ssh from localhost to p82 and accept the fingerprint
> 3. ssh from localhost to p75 and accept the fingerprint
> 4. ssh from p82 to p82 and accept the fingerprint
> 5. ssh from p82 to p75 and accept the fingerprint
> 6. ssh from p75 to p75 and accept the fingerprint
> 7. ssh from p75 to p82 and accept the fingerprint
>
> Now I can use the ssh key which is stored in the agent running on
localhost
> to ssh from each machine to every other machine.
>
> X10 config:
>
> 1. add remote connection to p82
>    - specify host, username, ssh-key and passphrase
> 2. validate remote connection
> 3. identify a list of hosts
>    - add p82
>    - add p75
> 4. specify number of places: 2
> 5. compilation settings:
>    - select output folder on remote host (via browse button)
>    - select X10 distribution on remote host (via browse button)
> 6. operating system was either chosen automatically or through selecting
linux
>
> Now I want to run this small program:
>
> import x10.compiler.Native;
>
> public class ClusterTest {
> public static def main(Array[String]) {
>     atomic {
>         @Native("c++", "char hostname[1024]; gethostname(hostname, 1024);
> puts(hostname);") {}
>         Console.OUT.println("Hello World from Place (" + p + ")");
>     }
> }
> }
>
> Afterwards I create a new launch configuration which uses the
communication
> interface
> defined in x10_platform.conf and run it.
> All files get transfered to p82 and compiled but upon execution I get the
> following error:
>
> Permission denied, please try again.
> Permission denied, please try again.
> Permission denied (publickey,password).
>
> If I reduce the number of places to one the error remains.
>
> However, if I ssh to p82 and execute the following commands:
>
> cd ClusterTest
> export X10_NPLACES=2
> export X10_HOSTLIST=p82,p75
> ./ClusterTest
>
> I get the expected output:
>
> i61p75
> Hello World from Place ([1])
> i61p82
> Hello World from Place ([0])
>
> I noticed however that setting X10_NPLACES to 4 also produces an error.
> Apparently fail2ban kicks in here which doesn't allow 2 ssh connections
> to the same host in a short period of time.
> But I would not expect this to be the problem when I use only 2 places
> for the setup within x10dt.
>
> Best regards,
>
> Manfred
>
>
> Mandana Vaziri <mvaz...@us.ibm.com> hat am 13. September 2011 um 03:36
> geschrieben:
>
> >
> > Hi Manfred,
> >
> > I thought I could reproduce this issue before but it's working for me
now.
> > So if you have a setup with a remote host X and a list of hosts X, Y,
Z,
> > you need to make sure that you can ssh from X to X, X to Y, and X to Z,
> > without using a password (i.e., public/private key setup). The
> > public/private key specified on the left hand side of the platform conf
is
> > only talking about connecting from your machine to remote host X. You
also
> > need to log into each machine X, Y, Z from X once manually to make sure
> > that the machines are recognized as authorized hosts.
> >
> > It seems that you have this setup as well. Could you please try to
> > reproduce this and let me know what error you are getting if any?
> >
> > Thanks,
> >
> > Mandana
> >
> > Mandana Vaziri
> > IBM T. J. Watson Research Center
> > http://www.research.ibm.com/people/m/mvaziri/
> >
> >
> >
> >
> > "Kroehnert, Manfred (kroehner)" <manfred.kroehn...@kit.edu> wrote on
> > 08/23/2011 10:04:52 AM:
> >
> > > From: "Kroehnert, Manfred (kroehner)" <manfred.kroehn...@kit.edu>
> > > To: Mailing list for users of the X10 programming language <x10-
> > > us...@lists.sourceforge.net>
> > > Date: 08/23/2011 10:06 AM
> > > Subject: Re: [X10-users] Starting a remote X10 program with Eclipse
X10DT
> > >
> > > Hello Mandana, David, Igor,
> > >
> > > thanks for your responses.
> > > For now it is not a huge problem to run the commands through the
> > commandline.
> > > But it is nice to hear that the problem is reproducible and is
> > beingworked on.
> > >
> > > @Igor:
> > > >Igor Peshansky <ig...@acm.org> hat am 23. August 2011 um 15:46
> > geschrieben:
> > > >
> > > > Hi, Manfred,
> > > >
> > > > This is not an issue with your user key; this looks like an issue
with
> > > > the *host* key.  Presumably, you have an entry in
~/.ssh/known_hosts
> > > > for that machine, and the entry does not match the key the host is
> > > > sending.
> > > >
> > > > When you say you can log in to the remote host via ssh, did you try
it
> > > > from the same machine that is running X10DT?
> > > >         Igor
> > >
> > > Yes, I know that it looks like a problem with known_hosts.
> > > Therefore I deleted all matching entries in the known_hosts file
> > > and reconnected to all the machines to accept the host keys anew.
> > > This was also necessary because some of the machines got reinstalled
> > > recently.
> > > So a connection from X10DT host -> remote host X as well as
> > > remote host X -> remote host X is possible using the ssh-key.
> > > Also remote host X -> remote host Y is working.
> > >
> > > Regards,
> > >
> > > Manfred
> > >
> > >
> > >
> > > > On Tue, Aug 23, 2011 at 6:07 AM, Kroehnert, Manfred (kroehner)>
> > > > <manfred.kroehn...@kit.edu> wrote:
> > > > > Hello Mandana,
> > > > >
> > > > > thanks for your response.
> > > > > I am responding to both of your emails.
> > > > >
> > > > >> In the mean time, perhaps you could try not using an ssh key and
> > > > >> passphrase, and see if that helps.
> > > > >
> > > > > I tried to do this by removing all "Remote Connections" from
> > > > > x10_platform.conf and afterwards adding the remote host again
> > > > > but with password base authentication.
> > > > >
> > > > > However, I still get the error "Host key verification failed."
> > > > > even though no ssh-key is mentioned in x10_platform.conf.
> > > > > So there is probably some caching involved which does not read
> > > > > the values anew after the config has been changed.
> > > > >
> > > > >> Mandana Vaziri <mvaz...@us.ibm.com> hat am 22. August 2011 um
18:16
> > > > >> geschrieben:
> > > > >>
> > > > >> Actually, what will probably work is to leave the name of the
host
> > as
> > > > >> "localhost" in step 6 below.
> > > > >> This is clearly a bug we need to fix... Please let me know if
this
> > change
> > > > >> works for you.
> > > > >
> > > > > I tried this and it worked both with password and ssh-key.
> > > > > But I am not sure if the password was used at all.
> > > > >
> > > > > Unfortunately this makes it impossible to run the program
> > > distributed across
> > > > > multiple computers.
> > > > > Am I correct that this list should normally reflect the contents
of
> > the
> > > > > environment variable X10_HOSTLIST?
> > > > >
> > > > > Regards,
> > > > >
> > > > > Manfred
> > > > >
> > > > >
> > > > >> Regards>
> > > > >> Mandana
> > > > >>
> > > > >> Mandana Vaziri
> > > > >> IBM T. J. Watson Research Center
> > > > >> http://www.research.ibm.com/people/m/mvaziri/
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> "Kroehnert, Manfred (kroehner)" <manfred.kroehn...@kit.edu>
wrote on
> > > > >> 08/22/2011 10:15:15 AM:
> > > > >>
> > > > >> > From: "Kroehnert, Manfred (kroehner)"
<manfred.kroehn...@kit.edu>
> > > > >> > To: x10-users@lists.sourceforge.net
> > > > >> > Date: 08/22/2011 10:16 AM
> > > > >> > Subject: [X10-users] Starting a remote X10 program with
Eclipse
> > X10DT
> > > > >> >
> > > > >> > Hello all,
> > > > >> >
> > > > >> > can anybody point me into the right direction on how to start
X10
> > > > >> programs on
> > > > >> > remote hosts using X10DT?
> > > > >> > My computer runs on OS X 10.6.8 and the remote machines run
Ubuntu
> > > > >> > Linux 32Bit.
> > > > >> >
> > > > >> > I have tried the following but it fails to work:
> > > > >> >
> > > > >> > 1.  create a new project with a hello world program
> > > > >> > 2.  modify the Hello.x10 file to print hello world on each
> > available
> > > > >> place
> > > > >> >
> > > > >> > Setup of x10_platform.conf:
> > > > >> >
> > > > >> > 3.  choose "Remote Connection"
> > > > >> > 4.  add new host configuration:
> > > > >> >     1. choose name
> > > > >> >     2. choose user
> > > > >> >     3. choose public key authentication with ssh key +
password
> > > > >> >     4. click validate to see a green checkmark appearing
> > > > >> >
> > > > >> > 5.  use Socket interface
> > > > >> > 6.  in section "Identify list of hosts" add the same
computerwhich
> > was
> > > > >> > configured in the remote connection
> > > > >> >
> > > > >> > Setup compilation and Linking for the remote host:
> > > > >> >
> > > > >> > 7.  select output directory on the remote host using the
> > > "browse" button
> > > > >> > 8.  select the directory of the X10 distribution on the
> > > remote host using
> > > > >> the
> > > > >> > "browse" button
> > > > >> > 9.  press "Validate Configuration"
> > > > >> > 10. save x10_platform.conf after the green checkmark on the
> > validate
> > > > >> button
> > > > >> > appears
> > > > >> >
> > > > >> > Now I try to run the program by creating a launch
configuration:
> > > > >> >
> > > > >> > 11. create new launch configuration
> > > > >> > 12. choose project
> > > > >> > 13. choose 'Hello' as the main class
> > > > >> > 14. leave "Communicatin Interface" to use data from
> > x10_platform.conf
> > > > >> > 15. click "Apply"
> > > > >> > 16. click "Run"
> > > > >> >
> > > > >> > Now X10DT uploads the files to the remote host and compiles
them
> > > > >> > but on running the program I get "Permission denied" errors
from
> > SSH.
> > > > >> >
> > > > >> > I can log in to the remote host using SSH + SSH key
> > > > >> > and execute the program on the commandline without problems.
> > > > >> >
> > > > >> > The I tried to use a different remote machine which which has
the
> > > > >> > same OS setup.
> > > > >> > But here X10DT fails earlier with the error "Host key
verification
> > > > >> failed.".
> > > > >> > Again I am able to log in to the remote host and run the
remotely
> > > > >> compiled
> > > > >> > program without issues.
> > > > >> >
> > > > >> > Does anybody know what is going wrong here or do I have to
> > > > >> configuresomething
> > > > >> > differently in order to make this work.
> > > > >> >
> > > > >> > Best regards,
> > > > >> >
> > > > >> > Manfred
> > > > >> >
> > > > >> >
> > > > >>
> > >
> >
>
------------------------------------------------------------------------------

> >
> > > > >>
> > > > >> > uberSVN's rich system and user administration capabilities and
> > model
> > > > >> > configuration take the hassle out of deploying and managing
> > Subversion
> > > > >> and
> > > > >> > the tools developers use with it. Learn more about uberSVN
> > > and get a free
> > > > >>
> > > > >> > download at:  http://p.sf.net/sfu/wandisco-dev2dev
> > > > >> > _______________________________________________
> > > > >> > X10-users mailing list
> > > > >> > X10-users@lists.sourceforge.net
> > > > >> > https://lists.sourceforge.net/lists/listinfo/x10-users
> > > > >>
> > >
> >
>
------------------------------------------------------------------------------

> >
> > > > >> uberSVN's rich system and user administration capabilities and
model
> > > > >> configuration take the hassle out of deploying and managing
> > > Subversion and
> > > > >> the tools developers use with it. Learn more about uberSVN and
get a
> > free
> > > > >> download at:  http://p.sf.net/sfu/wandisco-dev2dev
> > > > >> _______________________________________________
> > > > >> X10-users mailing list
> > > > >> X10-users@lists.sourceforge.net
> > > > >> https://lists.sourceforge.net/lists/listinfo/x10-users
> > > > >
> > > > >
> > >
> >
>
------------------------------------------------------------------------------

> >
> > > > > Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> > > > > user administration capabilities and model configuration. Take
> > > > > the hassle out of deploying and managing Subversion and the
> > > > > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> > > > > _______________________________________________
> > > > > X10-users mailing list
> > > > > X10-users@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/x10-users
> > > > >
> > > >
> > > >
> > >
> >
>
------------------------------------------------------------------------------

> >
> > > > Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> > > > user administration capabilities and model configuration. Take
> > > > the hassle out of deploying and managing Subversion and the
> > > > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> > > > _______________________________________________
> > > > X10-users mailing list
> > > > X10-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/x10-users
> > >
> > >
> >
>
------------------------------------------------------------------------------

> >
> > > Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> > > user administration capabilities and model configuration. Take
> > > the hassle out of deploying and managing Subversion and the
> > > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> > > _______________________________________________
> > > X10-users mailing list
> > > X10-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/x10-users
> >
>
------------------------------------------------------------------------------

> > BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> > Learn about the latest advances in developing for the
> > BlackBerry&reg; mobile platform with sessions, labs & more.
> > See new tools and technologies. Register for BlackBerry&reg; DevCon
today!
> > http://p.sf.net/sfu/rim-devcon-copy1
> > _______________________________________________
> > X10-users mailing list
> > X10-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/x10-users
>
>
------------------------------------------------------------------------------

> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the
> BlackBerry&reg; mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry&reg; DevCon
today!
> http://p.sf.net/sfu/rim-devcon-copy1
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to