title: Connect spyder to a remote kernel via ssh tunnel
body: <p>I am trying to connect spyder, running on local_machine (macOS), to a remote kernel running on compute_server (a compute node of a cluster). The compute node is not directly accessible via the internet, I can only access the cluster via login_server.</p>
  
  <p>I try the following: </p>
  
  <ol>
  <li>On compute_server I do:
  
  <blockquote>
    <p>python -m spyder_kernels.console</p>
  </blockquote></li>
  </ol>
  
  <p>To connect another client to this kernel, use:
      --existing kernel-20351.json</p>
  
  <p>I copy this json file to the appropriate place on local_machine. It contains the text:
   "shell_port": 46540,
    "iopub_port": 39268,
    "stdin_port": 40704,
    "control_port": 42637,
    "hb_port": 46887,</p>
  
  <ol start="2">
  <li>I create an ssh tunnel through login_server. On local_machine I do:</li>
  </ol>
  
  <p>ssh -L46540:compute_server:46540 -L39268:compute_server:39268 -L40704:compute_server:40704 -L42637:compute_server:42637 -L46887:compute_server:46887 me@login_server</p>
  
  <ol start="3">
  <li>I start spyder on local_machine, ask it to connect to an existing kernel, enter the name of the json file, check the 'This is a remote kernel' box, enter me@login_server for Host name. I have ssh keys set up for login to login_server already. </li>
  </ol>
  
  <p>The connection hangs. If I start the spyder kernel on login_server and omit Step 2 then it works fine, but I can't do heavy computation on login_server, I do have to work on compute_server.</p>
  
  <p>Any ideas? </p>