Its possible to use VSCode SFTP extension with WSL/Ubuntu? - visual-studio-code

I need to use Windows in the company to development. I enabled WSL2 and installed Ubuntu 20.04. The developer environment is hosted in an AWS EC2 instance. To made changes to the developer environment I use Natizyskunk's SFTP extension for VSCode.
However, the extension is not working when VSCode is launched from a WSL environment. It fails to sync, with no error message. I think this is because WSL2 is behaving like a remote task in VSCode. Can someone help me? I hate using Windows for development, and I would like to use WSL2 with SFTP extension instead.

Related

Visual Studio Code remote access to a WSL2:ubuntu on my desktop from my macbook

've looked around and can't seem to find the answer to this - probably because the feature is pretty new.
I tried the remote WSL:ubuntu connection on my windows desktop machine to connect to my WSL2 Ubuntu running on the same machine. This is pretty much perfect as it allows access to my Nvidia GPU under linux
Is there anyway I can do the same trick from my macbook? I can connect to the windows side of the desktop using the new remote tunnel feature but I'm drawing a blank on how to do for the WSL buried in that machine. It looks like it's just using the same remote connection feature so I'm thinking it should be possible but WSL2 network is not exposed the same way you can with a VM or other machine.
The desktop has way more everything than my macbook including a nvidia GPU I want to use for some machine learning.
I can do it from the desktop itself - but it's nice to be able to use that machine from my macbook at certain times of day.
I have recently started using VSCode so I'm on the learning curve with it - it may well be that it's not possible using the new remote tunnels - or requires some messing with adding a new hyper-v bridged adapter to the WSL installation. I'm hoping against hope there's an easy solve that I've somehow missed.
I tried setting up the remote tunnel as per https://code.visualstudio.com/blogs/2022/12/07/remote-even-better but it seems to setup a server to access windows not the WSL2 service.
Thanks for any help!
I had a similar problem and found this github issue. While the developers are looking into including this feature, you currently will need to install the VSCode CLI directly in WSL. You can find the downloads here
Notes
I would recommend the x64 CLI download in the Linux section. It will download a tar.gz file which will have a file named code in it when extracted.
The tunnel will launch from wherever you place that code file, so I put mine in the ~/ (home) directory.
You can then open a tunnel using the command ./code tunnel from that location. You can replace the . with the path to the code file to open the tunnel while in a different directory, i.e. ~/code.
You can still launch a tunnel from Windows with code tunnel. (note that this command does not have ./)

Visual studio code remote-ssh code syntax highlight

I'm remotely connecting via Microsoft remote-ssh plugin on Visual code studio 1.65.2 on Manjaro Linux (rolling build 64-bit). I'm having trouble with syntax highlight, it does not work. I work otherwise locally or via mapped drives, but not over remote ssh. Am I missing something, perhaps configuration? I would prefer not install to plugins on remote server.
I think plugin was needed to be installed on the server to make this work, however I was trying to avid that. Instead I used the FTP plugin to sync the files between local folder and remote.

Remote Kubernetes development in Spyder (Python) with Okteto

For Visual Studio Code (VSC) it is possible to install the Remote-Kubernetes extension which allows you to work directly with remote development environments, spinning them up, configuring them etc. More info here.
Is something similar possible for Spyder?
I am aware that a connection to a remote kernel can be made but this seems to require for the remote environment to already be running. Am looking for same functionality as the okteto up command in VSC.

Visual Studio Code: Remote-SSH connect to Windows Server 2019

I've set up my VSCode Insider to connect th a Windows 2019 Server via the Remote-SSH extension. Is it correct, that I need a WSL installed so that it can set up the VSCode-Server and then it is running within the WSL distro when I'm connected?
I thought it would run on Windows instead.
The stable VS Code 1.40 release does not support for Windows ssh hosts: https://code.visualstudio.com/docs/remote/ssh#_remote-ssh-limitations
This feature is still experimental and only enabled in VS Code insiders builds when you set "remote.SSH.remoteIsWindows": true (Make sure to use the nightly ssh extension too) See this issue for details
You do not need to run WSL. You need to install a ssh client on your local machine (the machine that you will run VS Code), and install a ssh server on your remote machine. That's all you need. Your local VS Code uses the ssh client to connect to that ssh server on the remote machine. Details of how to do this can be found here, including opening firewall ports in the case of Windows.

Using PostgreSQL installed in Windows inside WSL as well?

I have installed PostgreSQL version 10 in Windows. Since I'm doing Web development work and using WSL frequently I would like to use PostgreSQL from within WSL too.
Is there anyway in which we are able to link the PostgreSQL software installed in Windows with WSL environment so that any new databases created inside WSL is available in the Windows environment also?
1) PostgreSQL10 installed on Windows environment.
2) PostgresSQL9.5 installed inside WSL environment.
My Question is: how do I connect both Windows configurations WSL to use the same PostgreSQL instance?