-2

With MobaXterm on Windows, I am able to open a SSH remote file with VSCode just by double clicking it (after that I set this is my default text editor). However, I am not able to open a folder and all it subfiles with vscode.

The following screenshot shows that I can open the folder Badminton with VSCode as it is in local in my computer.

enter image description here

This next screenshot shows that I can't open folder OBSC - SingleBattery with VSCode which is a remote folder on a SSH session in MobaXterm.

enter image description here

When I double click OBSC - SingleBattery, it enters inside it within MobaXterm (which is the most convenient behavior for a folder). Right+click doesn't allow you to open the folder with, oppositely to files. I also tried to open the folder within vscode with the corresponding path:

C:\Users\MyUserName\AppData\Roaming\MobaXterm\slash\RemoteFiles\67288_7_20\Project.toml (One of the files within my folder that'd like to open with VSCode)
C:\Users\MyUserName\AppData\Roaming\MobaXterm\slash\RemoteFiles\67288_7_20 (path that I open with vscode)

But that only opens one folder with one file (for this instance Project.toml) instead of all the files inside the folder.

Using MobaXterm is mandatory. Using VSCode is not, I am open to Atom as well or any editor that you would suggest that can handle this functionality and is convenient for developing JuliaLang projects.

EDIT thanks to @harrymc comments and answer My SSH settings in MobaXterm are:

RemoteHost: bastion1.SomeURL.fr
Specified Username: [email protected]:[email protected]
Port: 22
3
  • 1
    Is the procedure described the article Connect over SSH with Visual Studio Code a solution? It uses the Visual Studio Code Remote - SSH extension.
    – harrymc
    Commented Jan 18 at 11:22
  • 1
    When you open a file by double-clicking it in MobaXterm, it copies that one file over to your local machine's appdata folder first, then opens that local file in your editor. Editors like vscode have no knowledge of how to find other files that don't exist on your local machine yet. Some other ssh clients like winscp have better features to sync remote and local files, like: superuser.com/a/1385889/673426
    – Cpt.Whale
    Commented Jan 18 at 16:13
  • @harrymc, I edited my question thanks to your comments and answer
    – JKHA
    Commented Jan 22 at 10:04

1 Answer 1

1

Please follow the procedure described the article
Connect over SSH with Visual Studio Code.

The article uses the Visual Studio Code Remote - SSH extension:

Remote - SSH

With the Remote - SSH extension installed, you will see a new Status bar item at the far left.

enter image description here

The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Remote - SSH commands.

enter image description here

1
  • I don't have your environment for testing, but the article seems very detailed.
    – harrymc
    Commented Jan 22 at 10:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .