vscode-remote-release
vscode-remote-release copied to clipboard
Does not use ssh configs that have a `:` in the Host
Is there an existing issue for this bug?
- [X] I have searched the existing issues
Required Troubleshooting Steps
- [X] I have followed these troubleshooting steps
- [X] I have tried both values of the
remote.SSH.useLocalServer
setting
Connect Locally
It connects successfully
->
No response
Expected Behavior
Here is the ssh config:
Host 192.168.1.205:6022
HostName 192.168.1.205
Port 6022
User user1
Host 192.168.1.205
HostName 192.168.1.205
Port 22
User user2
When I click the connection button of 192.168.1.205:6022, it connects 192.168.1.205 with user2 instead of user1. What I execpted is connecting with ssh -p 6022 [email protected] when I click the button of 192.168.1.205:6022, and connecting with ssh -p 22 [email protected] when I click the button of 192.168.1.205:22
Steps To Reproduce
- add 2 configuration for different user on different port for same host
- connect with any configuration
- error happends
Remote-SSH Log
Remote-SSH Log
[22:10:01.600] Log Level: 2
[22:10:01.612] SSH Resolver called for "ssh-remote+192.168.1.205:6022", attempt 1
[22:10:01.613] "remote.SSH.useLocalServer": true
[22:10:01.613] "remote.SSH.useExecServer": false
[22:10:01.614] "remote.SSH.path": undefined
[22:10:01.614] "remote.SSH.configFile": undefined
[22:10:01.614] "remote.SSH.useFlock": true
[22:10:01.615] "remote.SSH.lockfilesInTmp": false
[22:10:01.616] "remote.SSH.localServerDownload": auto
[22:10:01.616] "remote.SSH.remoteServerListenOnSocket": false
[22:10:01.616] "remote.SSH.showLoginTerminal": false
[22:10:01.616] "remote.SSH.defaultExtensions": []
[22:10:01.616] "remote.SSH.loglevel": 2
[22:10:01.617] "remote.SSH.enableDynamicForwarding": true
[22:10:01.617] "remote.SSH.enableRemoteCommand": false
[22:10:01.618] "remote.SSH.serverPickPortsFromRange": {}
[22:10:01.618] "remote.SSH.serverInstallPath": {}
[22:10:01.634] VS Code version: 1.85.1
[22:10:01.634] Remote-SSH version: [email protected]
[22:10:01.634] darwin x64
[22:10:01.636] SSH Resolver called for host: 192.168.1.205
[22:10:01.636] Setting up SSH remote "192.168.1.205"
[22:10:01.640] Acquiring local install lock: /var/folders/gq/chx39bys79v1q5vth6n3ylcc0000gn/T/vscode-remote-ssh-d8018506-install.lock
[22:10:01.641] Looking for existing server data file at /Users/dh/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d8018506-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2-0.107.1-tr/data.json
[22:10:01.642] Using commit id "0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2" and quality "stable" for server
[22:10:01.645] Install and start server if needed
[22:10:01.648] PATH: /Users/dh/software/spark-3.5.0-bin-hadoop3/bin:/Users/dh/software/gradle-8.0.2/bin:/Users/dh/software/apache-maven-3.9.3/bin:/Users/dh/software/scala-2.13.11/bin:/Users/dh/software/jdk-17.0.7.jdk/Contents/Home//bin:/Users/dh/software/bin:/Users/dh/projects/CLionProjects/.common_repo/grpc/1.56.0/bin:/usr/local/opt/llvm/bin:/Applications/CLion.app/Contents/bin/cmake/mac/bin/:/Users/dh/software/go/bin/:/Users/dh/software/node-v18.16.0-darwin-x64//bin/:/usr/local/bin:/usr/local/sbin:/Users/dh/Library/Python/3.9/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/dh/.cargo/bin
[22:10:01.648] Checking ssh with "ssh -V"
[22:10:01.660] > OpenSSH_9.0p1, LibreSSL 3.3.6
[22:10:01.664] askpass server listening on /var/folders/gq/chx39bys79v1q5vth6n3ylcc0000gn/T/vscode-ssh-askpass-714153b3a0a3c1b551eff3a2bbc747e8f990199d.sock
[22:10:01.664] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/gq/chx39bys79v1q5vth6n3ylcc0000gn/T/vscode-ssh-askpass-7f9c44786286e6931e959a699b47647c68b90b87.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","49455","-o","ConnectTimeout=15","-p","6022","192.168.1.205"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/dh/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d8018506-0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2-0.107.1-tr/data.json"}
[22:10:01.664] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.Q9NYHUBe2W/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/dh/.vscode/extensions/ms-vscode-remote.remote-ssh-0.107.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/dh/.vscode/extensions/ms-vscode-remote.remote-ssh-0.107.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/gq/chx39bys79v1q5vth6n3ylcc0000gn/T/vscode-ssh-askpass-714153b3a0a3c1b551eff3a2bbc747e8f990199d.sock"}
[22:10:01.666] Spawned 17961
[22:10:01.868] > local-server-1> Running ssh connection command: "-v -T -D 49455 -o ConnectTimeout=15 -p 6022 192.168.1.205"
[22:10:01.872] > local-server-1> Spawned ssh, pid=17978
[22:10:01.879] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[22:10:02.191] stderr> debug1: Server host key: ssh-ed25519 SHA256:4zefJ1bVbxN4GJVPhok8MkC1sfIus7N/XeuZfd4Q9s0
[22:10:02.765] Got askpass request: {"request":"[email protected]'s password:"}
[22:10:02.766] Showing password prompt
[22:10:02.768] Listening for interwindow password on /var/folders/gq/chx39bys79v1q5vth6n3ylcc0000gn/T/vscode-ssh-askpass-055bfaacd6fa04646f99bba688af9badee58409a.sock
[22:10:02.768] Writing password prompt to globalState
Anything else?
No response
The reason it works this way, differently than ssh itself, is that people kept filing issues expecting ip:port
to work the same as ssh -p port ip
, not to use an ssh config with that name. We can probably do better on the extension side when you selected that host from your ssh config, but for now I recommend using a different Host name
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding
:slightly_frowning_face: In the last 60 days, this feature request has received less than 10 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!