# SSH extension for VSCode

**URL:** <https://discourse.julialang.org/t/ssh-extension-for-vscode/71290>\
**Category:** VS Code\
**Tags:** ssh\
**Created:** [November 10, 2021, 8:52pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290 "2021-11-10T20:52:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avec](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Avec](https://discourse.julialang.org/u/Avec)\
**Post date:** [November 10, 2021, 8:52pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/1 "2021-11-10T20:52:43Z")

</div>

Hi,  
I was succesfully using SSH extension in VSCode to code in julia on a remote machine, but it broke down without any obvious reason. When I start start the VScode and connect to the server, everything loads as usual, but julia does not start and it says

“Could not start the Julia language server. Make sure the configuration setting julia.executablePath points to the Julia binary.”

The julia executable path is set on the local machine and it works. Is there a way to set it for the remote machine? Julia is installed there and runs from the command line with no problems.  
Thanks for any advice.

---

<div class="post-metadata">

**Author:** ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)\
**Post date:** [November 10, 2021, 10:30pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/2 "2021-11-10T22:30:43Z")

</div>

Look for the command “Open Remote Settings” and you can set a `julia.executablePath` which applies only to that remote.

---

<div class="post-metadata">

**Author:** ![Avec](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Avec](https://discourse.julialang.org/u/Avec)\
**Post date:** [November 11, 2021, 6:59am UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/3 "2021-11-11T06:59:22Z")

</div>

Thank you, it works now. Just out of curiosity, do you have any idea why it worked without setting it before and now it stopped?

---

<div class="post-metadata">

**Author:** ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)\
**Post date:** [November 11, 2021, 7:07pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/4 "2021-11-11T19:07:20Z")

</div>

No idea, maybe the local executablepath happened to also be correct for the remote machine previously, but then something there changed?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [November 11, 2021, 8:52pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/5 "2021-11-11T20:52:55Z")

</div>

There was an update to the Julia extension a few weeks back which changed how the binary path is resolved, so maybe you hadn’t updated the extension on the remote in a while and only ran into the issue after the update?

---

<div class="post-metadata">

**Author:** ![dmetivie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmetivie/32/6926_2.png) [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Post date:** [December 7, 2021, 1:50pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/6 "2021-12-07T13:50:31Z")

</div>

I have the same issue: the SSH extension was working at some point with the Julia: I could run code inline and it was lauching a REPL.  
Now when I open a remote session, it says  
“Could not start the Julia language server. Make sure the configuration setting julia.executablePath points to the Julia binary.”

It is university cluster, I set manually the path to in my case “/mnt/beegfs/softs/opt/core/julia/1.6.1/bin/” as suggested by @marius311. But the error still is here.  
Even if I do `ml load julia` in a terminal, `julia` in a terminal runs the REPL, but the extension still do not work.

By the way, how should I start the Julia extension (if it works) directly in an interactive node (and not login node) which I launch typically with

```julia
srun --nodes=1 --ntasks-per-node=1 --mem=MaxMemPerNode --time 3:00:00 -p cpu_shared --pty /bin/bash -i

```

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 7, 2021, 2:09pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/7 "2021-12-07T14:09:38Z")

</div>

You need to set that path to the actual binary, no the directory containing the binary.

---

<div class="post-metadata">

**Author:** ![dmetivie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmetivie/32/6926_2.png) [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Post date:** [December 7, 2021, 3:11pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/8 "2021-12-07T15:11:26Z")

</div>

Ho! Thanks you! This works indeed.

Do you have an idea on how to make the extension work directly in a interactive node?

---

<div class="post-metadata">

**Author:** ![DrChainsaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drchainsaw/32/8497_2.png) [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Post date:** [December 7, 2021, 5:29pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/9 "2021-12-07T17:29:54Z")

</div>

> [@dmetivie](#):
>
> By the way, how should I start the Julia extension (if it works) directly in an interactive node (and not login node)

I have solved this by pirating `Sockets.connect(path)` to route the socket vs code uses to talk to the REPL through TCP using socat before passing it on (basically pointing the julia executable to a script which does all of this before running the launch command). I don’t think I can genuinely recommend this approach so if there are options I wouldn’t mind knowing about them.

I suppose that if the node has ssh enabled you might have more options, such as running vs code remotely against the interactive node.

---

<div class="post-metadata">

**Author:** ![dmetivie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmetivie/32/6926_2.png) [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Post date:** [February 8, 2022, 10:48pm UTC](https://discourse.julialang.org/t/ssh-extension-for-vscode/71290/10 "2022-02-08T22:48:02Z")

</div>

Indeed, I discovered that, the node on the cluster I use has ssh enable, so the [following setup works](https://ni.cmu.edu/computing/knowledge-base/ssh-vscode-setup/).  
It is amazing!

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/c/8ca2da324c8b85d2aa86968144fdf189d5e714ab.png)
