SSH connection error - Permission denied (publickey)
<p>I'm trying to run a Spark cluster on AWS using <a href="https://github.com/amplab/spark-ec2" rel="nofollow noreferrer">https://github.com/amplab/spark-ec2</a>.</p>

<p>I've generated a key and and login credentials, and I'm using this command:</p>

<pre><code>./spark-ec2 --key-pair=octavianKey4 --identity-file=credentials3.csv --region=eu-west-1 --zone=eu-west-1c launch my-instance-name
</code></pre>

<p>However, I keep getting this:</p>

<pre><code>Warning: SSH connection error. (This could be temporary.)
Host: mec2-myHostNumber.eu-west-1.compute.amazonaws.com
SSH return code: 255
SSH output: Warning: Permanently added 'ec2-myHostNumber.eu-west-1.compute.amazonaws.com,myHostNumber' (ECDSA) to the list of known hosts.
Permission denied (publickey).
</code></pre>

<p>If I quit the console and then try to start the cluster again, I get this:</p>

<pre><code>Setting up security groups...

Searching for existing cluster my-instance-name in region eu-west-1...
Found 1 master, 1 slave.
ERROR: There are already instances running in group my-instance-name-master or my-instance-name-slaves
</code></pre>