title: Cannot SSH Dataproc Master in Cluster
body: <p>I've been trying to create a cluster in Dataproc using as initialization script the <a href="https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/tree/master/jupyter" rel="nofollow noreferrer">jupyter repository</a>.</p>
  
  <p>But when I try to ssh to the master so to be able to access the Jupyter interface running this command:</p>
  
  <pre><code>gcloud compute ssh --zone=zone_name \
                     --ssh-flag="-D 10000" \
                     --ssh-flag="-N" \
                     --ssh-flag="-n" "cluster1-m" &amp;
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>Permission denied (publickey). ERROR: (gcloud.compute.ssh)
    [/usr/bin/ssh] exited with return code [255].</p>
  </blockquote>
  
  <p>I could confirm that all ssh keys are created normally. I tried this other option then:</p>
  
  <pre><code>gcloud compute ssh --zone=zone_name \
                     --ssh-flag="-D 10000" \
                     --ssh-flag="-N" \
                     --ssh-flag="-n" "will@cluster1-m" &amp;
  </code></pre>
  
  <p>Which seems to work as I can ssh into the instance but now I get the error:</p>
  
  <blockquote>
    <p>bind: Cannot assign requested address
    channel_setup_fwd_listener_tcpip: cannot listen to port: 10000 Could
    not request local forwarding.</p>
  </blockquote>
  
  <p>For creating the cluster I used:</p>
  
  <pre><code>gcloud dataproc clusters create $CLUSTER_NAME \
  --metadata "JUPYTER_PORT=8124,JUPYTER_CONDA_PACKAGES=numpy:pandas:scikit-learn:jinja2:mock:pytest:pytest-cov" \
  --initialization-actions \
      gs://dataproc-initialization-actions/jupyter/jupyter.sh \
  --bucket $BUCKET_NAME
  </code></pre>
  
  <p>and I'm running this in a docker image Debian 8.9 (jessie).</p>
  
  <p>If you need any extra information please let me know.</p>