title: VS Code - Openfolders and edit files through SSH tunnel
body: <p>I typically use VS Code's Remote-SSH extension to connect to an AWS instance where I do my work. There's a nice section of their documentation about how to do that <a href="https://code.visualstudio.com/docs/remote/ssh-tutorial" rel="nofollow noreferrer">here</a>. I hate just using the terminal alone because I like the debugger and the ability to open up folders and files for viewing. Until recently I had been SSH-ing from my MacBook Pro (A) to an AWS instance running Ubuntu 18.04.4 LTS (B) without any issues. Now, however, I need to work on a new instance, also Ubuntu 18.04.4 LTS, (C) that I can only SSH into from B, and not from A.</p>
  <p><a href="https://code.visualstudio.com/docs/remote/ssh#_forwarding-a-port-creating-ssh-tunnel" rel="nofollow noreferrer">This part of the documentation</a> indicates that I can SSH from A to B and then forward a port to create an SSH tunnel. However, this only allows me to open a terminal into C. However, this doesn't allow me to open folders and files in the Explorer like I want to.</p>
  <p>I've followed Qinsheng's instructions <a href="https://stackoverflow.com/a/58083218/13177304">here</a> to set up an SSH tunnel and use the Remote-SSH extension's &quot;ProxyJump&quot; functionality My config file looks like this:</p>
  
  <pre><code>Host B
    HostName B.mydomain.com
    IdentityFile /Users/MyID/.ssh/B_private_key
    User me
  
  Host C
    HostName C
    IdentityFile /Users/MyID/.ssh/C_private_key
    ProxyJump B
    User me
  </code></pre>
  <p>This works perfectly when I use the terminal on VS Code to run <code>ssh C</code>. Without having to input any password(s) I am taken to C and can perform my work. However, when I try to use the &quot;Remote-SSH: Connect to Host&quot; functionality to SSH into C, using ProxyJump through B and subsequently open a folder/view files there, I get the message &quot;Could not establish connection to 'C'&quot;. The stack trace looks like this:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[13:59:48.537] Log Level: 2
  
  [13:59:48.539] remote-ssh@0.51.0
  [13:59:48.539] darwin x64
  [13:59:48.541] SSH Resolver called for "ssh-remote+C", attempt 1
  [13:59:48.541] SSH Resolver called for host: C
  [13:59:48.541] Setting up SSH remote "C"
  [13:59:48.546] Acquiring local install lock: /var/folders/w2/0w6jys8d34x940rj7f5r20vnh83ht7/T/vscode-remote-ssh-C-install.lock
  [13:59:48.590] Looking for existing server data file at /Users/MyID/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-v1-91899dcef7b8110878ea59626991a18c8a6a1b3e-0.51.0/data.json
  [13:59:48.593] Using commit id "91899dcef7b8110878ea59626991a18c8a6a1b3e" and quality "stable" for server
  [13:59:48.595] Install and start server if needed
  [13:59:48.599] Checking ssh with "ssh -V"
  [13:59:48.629] &gt; OpenSSH_8.1p1, LibreSSL 2.7.3
  [13:59:48.632] askpass server listening on /var/folders/w2/0w6jys8d34x940rj7f5r20vnh83ht7/T/vscode-ssh-askpass-c4eabfddec4ae91c1e423a3167dd184d8553da26.sock
  [13:59:48.633] Spawning local server with {"ipcHandlePath":"/var/folders/w2/0w6jys8d34x940rj7f5r20vnh83ht7/T/vscode-ssh-askpass-b00842fb08dbbff49678439b1335f105364fd9d5.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","52911","-o","ConnectTimeout=15","C"],"dataFilePath":"/Users/MyID/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-v1-91899dcef7b8110878ea59626991a18c8a6a1b3e-0.51.0/data.json"}
  [13:59:48.633] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/MyID/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Users/MyID/Desktop/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/MyID/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/w2/0w6jys8d34x940rj7f5r20vnh83ht7/T/vscode-ssh-askpass-c4eabfddec4ae91c1e423a3167dd184d8553da26.sock"}
  [13:59:48.635] Spawned 29414
  [13:59:48.734] &gt; local-server&gt; Spawned ssh: 29415
  [13:59:48.738] stderr&gt; OpenSSH_8.1p1, LibreSSL 2.7.3
  [13:59:48.740] stderr&gt; /bin/false: No such file or directory
  [13:59:48.740] stderr&gt; kex_exchange_identification: Connection closed by remote host
  [13:59:48.741] &gt; local-server&gt; ssh child died, shutting down
  [13:59:48.745] Local server exit: 0
  [13:59:48.745] Received install output: OpenSSH_8.1p1, LibreSSL 2.7.3
  /bin/false: No such file or directory
  kex_exchange_identification: Connection closed by remote host
  
  [13:59:48.746] Stopped parsing output early. Remaining text: OpenSSH_8.1p1, LibreSSL 2.7.3/bin/false: No such file or directorykex_exchange_identification: Connection closed by remote host
  [13:59:48.746] Failed to parse remote port from server output
  [13:59:48.747] Resolver error: 
  [13:59:48.750] ------</code></pre>
  </div>
  </div>
  </p>
  <p>It seems clear to me that the main problem is something trying to access <code>/bin/false</code> as the interpreter. I assume that this is an issue with my MacBook Pro (A). I did notice that when running <code>echo $SHELL</code> on A that it was returning <code>/bin/false</code>, but I ran <code>export SHELL=/bin/bash</code> to change that and followed the suggestions in <a href="https://github.com/microsoft/vscode/issues/37087" rel="nofollow noreferrer">this post</a> to set VS Code's integrated shell for MacOS to <code>/bin/bash</code> as well. I've checked <code>echo $SHELL</code> on B as well and it is similarly showing <code>/bin/bash</code> too.</p>
  <p>My questions are these:</p>
  <ol>
  <li>Is what I am trying to accomplish possible?</li>
  <li>If it is, what am I doing wrong?/what can I check to help make sure that I can get to the VS Code functionalities that I want?</li>
  </ol>