Note that there are some explanatory texts on larger screens.

plurals
  1. POR connecting to EC2 instance for parallel processing
    primarykey
    data
    text
    <p>I am having trouble initialising a connection to an AWS EC2 instance from R as I seem to keep getting the error: <code>Permission denied (publickey)</code> I am currently using a Mac OS X 10.6.8 as my OS</p> <p>The code that I try to run in the terminal ($) and then R (>) is as follows:</p> <pre><code>$ R --vanilla &gt; require(snowfall) &gt; sfInit(parallel=TRUE,socketHosts =list("ec2-xx-xxx-xx-xx.zone.compute.amazonaws.com")) Permission denied (publickey) </code></pre> <p>but weirdly when trying to ssh into the instance I don't need a password as I had already imported the public key into the instance upon initialization, (I think)</p> <p>so from my normal terminal...when running</p> <pre><code>$ ssh ubuntu@ec2-xx-xxx-xx-xx.zone.compute.amazonaws.com </code></pre> <p>it automatically connects...(so im not 100% sure if its a passwordless issue like in <a href="https://stackoverflow.com/questions/7333801/using-snow-and-snowfall-with-aws-for-parallel-processing-in-r">Using snow (and snowfall) with AWS for parallel processing in R</a>)</p> <p>I have tried looking through a fair amount of the material on keys etc, but none of it seems to be making much of a difference. Also my <code>~/.ssh/authorized_keys</code> is a folder rather than a file for some reason and I can't access it even when trying <code>sudo cd .ssh/authorized_keys</code>... in terms of permissions it has <code>drw-------</code></p> <p>The end goal is to connect to a lot of ec2 instances and use <code>foreach</code> to carry out some parallel processing...but connecting to one for now would be nice...also I would like to use my own ami so the starcluster isn't really what I am looking for....(unless I am able to use private amis and run all commands privately...)</p> <p>also if doRedis is better than if someone could show me how one would connect to the ec2 instance from a local machine that would be good too...</p> <p><strong>EDIT</strong></p> <p>I have managed to deal with the ssh password-less login using the <code>parallel</code> package <code>makePSOCKcluster</code> as shown in <a href="https://stackoverflow.com/questions/13564038/r-and-makepsockcluter-ec2-socketconnection">R and makePSOCKcluter EC2 socketConnection</a> ...but now coming across <code>socketConnection</code> issues as shown in the question in the link...</p> <p>Any ideas how to connect to it?</p> <p>Also proof that everything is working, I guess would mean that the following command/function would work to get in all the different ip addresses</p> <pre><code>d &lt;- parLapply(cl1, 1:length(cl1),function(x)system("ifconfig",intern=T)[2]) </code></pre> <p>where <code>cl1</code> is the output of the <code>make*cluster</code> function</p> <p><strong>NOTE</strong> since the bounty is really for the question in the link....I don't mind which question you post up an answer to...but the so long as something is written on this question that links it to the correct answer on the linked question, then I will award the points accordingly...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload