vscode-sshfs icon indicating copy to clipboard operation
vscode-sshfs copied to clipboard

How to specify that password is actually empty so that I won't be prompted for it?

Open jraygauthier opened this issue 3 years ago • 3 comments

Currently using v1.23.1 on code v1.61.0.

jraygauthier avatar Oct 25 '21 15:10 jraygauthier

Specifying an empty password was working fine with the previous version I was using, so this is actually a regression. Might be related: #192 or even the cause of .

jraygauthier avatar Oct 25 '21 15:10 jraygauthier

Do you know of a version where this issue doesn't happen? I don't remember touching any code related to this in quite a while.

Does entering anything as a password work? The underlying ssh2 library should first attempt username-only authentication (none) before trying password. Enabling DEBUG_SSH2 should show none happening before password:

  • Add DEBUG_SSH2 to the sshfs.flags array in VS Code's User Settings (settings.json) e.g. "sshfs.flags": ["DEBUG_SSH2"]
    • See this issue for more information about adding flags
  • If you already have a connection open, close it completely (or even reload the window)
  • Go to Output > SSH FS to get the logs with debugging enabled

SchoofsKelvin avatar Oct 27 '21 20:10 SchoofsKelvin

I am actually also interested in this possibility. If I have a target device with no password set, I would like to specify something like <no-password> as pasword.

I also tried with an empty string in the settings.json file like:

    "sshfs.configs": [
        {
            "name": "fct-015",
            "host": "fct015",
            "root": "/",
            "username": "root",
            "password": "",
            "newFileMode": "0o777"
        }
    ],

Output of SSH FS is:

[INFO]    
Created output channel for vscode-sshfs
When posting your logs somewhere, keep the following in mind:
  - While the logging tries to censor your passwords/passphrases/..., double check!
    Maybe you also want to censor out e.g. the hostname/IP you're connecting to.
  - If you want to report an issue regarding authentication or something else that
    seems to be more of an issue with the actual SSH2 connection, it might be handy
    to reconnect with this added to your User Settings (settings.json) first:
      "sshfs.flags": [ "DEBUG_SSH2" ],
    This will (for new connections) also enable internal SSH2 logging.

[INFO]    Loading configurations...
[INFO]    Calculated config flags: {"fs_notify_errors":["write","Fix for issue #282"],"debug_ssh2":[null,"Global Settings"]}
[DEBUG]   	Added configuration fct-015 from [1]
[INFO]    Applied config layers resulting in 1 configurations
[INFO]    Extension activated, version 1.26.1, mode 1
[DEBUG]   Running VS Code version 1.80.1 {
    "node": "16.17.1",
    "v8": "10.8.168.25-electron.0",
    "uv": "1.43.0",
    "zlib": "1.2.12.1-motley",
    "brotli": "1.0.9",
    "ares": "1.18.1",
    "modules": "110",
    "nghttp2": "1.47.0",
    "napi": "8",
    "llhttp": "6.0.9",
    "openssl": "1.1.1",
    "cldr": "41.0",
    "icu": "71.1",
    "tz": "2023c",
    "unicode": "14.0",
    "electron": "22.3.14",
    "microsoft-build": "21893604",
    "chrome": "108.0.5359.215"
}
[INFO]    Version history: 1.26.1:1685448893362:1690453117935
[INFO]    [createConnection(fct-015,config)] Creating a new connection for 'fct-015'
[INFO]    Calculating actual config
[DEBUG]   	No privateKey, agent or password. Gonna prompt for password

Is it possible to add this possiblity / setting?

appenzellergeller avatar Jul 27 '23 10:07 appenzellergeller