SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

Add support for only-sftp #303

Open gerstavros opened 2 years ago

gerstavros commented 2 years ago

The extension can't work with configuration where the ssh user supports only internal-sftp and no shell acces, as it connects using ssh instead of sftp command

SchoofsKelvin commented 2 years ago

Adding a negated CHECK_HOME flag (e.g. -CHECK_HOME or CHECK_HOME=false, see #270) should get the file system up and running. I'll see about adding another option that does some other things, e.g. disabling spawning terminals instead of them launching and immediately failing.

gerstavros commented 2 years ago

CHECK_HOME=false works. Thank you

camjac251 commented 2 years ago

I tried to get this working as well. For me, I have an sftp server up with no ssh:// in use, only sftp://. sftp:// in my terminal works, but after adding CHECK_HOME=false in the site config as "flags": ["CHECK_HOME=false"] and restarting many times, it just hangs on connecting

camjac251 commented 2 years ago

I'm on Visual Studio Code version 1.65.2. I switched to version of this addon to 1.2.0 and it worked, with "flags": ["-CHECK_HOME"]. Version 1.2.1 didn't work with it.

SchoofsKelvin commented 2 years ago

I'm on Visual Studio Code version 1.65.2. I switched to version of this addon to 1.2.0 and it worked, with "flags": ["-CHECK_HOME"]. Version 1.2.1 didn't work with it. @camjac251

Which version worked and didn't work? This extension is now at version v1.24.1 and back in v1.2.0 there was no flag system.

camjac251 commented 2 years ago

The latest version, and pretty much all the way down to v1.2.1 didn't work for me. Version 1.2.0 does work for me right now though, using it currently.

SchoofsKelvin commented 2 years ago

That's strange. I don't see how v1.2.0...v1.2.1 would make a difference for this.

Those early versions didn't have logging yet, so it'll be hard to find the cause. Especially since the only reasonable cause would be omitting that mode or flag field in createWriteStream, which seems very unlikely to hang the process.

camjac251 commented 2 years ago

I'm sorry for the delay in my reply. I've been using 1.2.0 since my post and it has worked really well. I tried again today to update the version, one up at a time. I was able to get it working up to 1.20.2 while using "flags": ["CHECK_HOME=false"] but 1.21.0 failed with Error connecting to SSH FS name: Unable to exec