Can't connect remote-ssh VSCode - No Kerberos credentials available - visual-studio-code

I installed remote-ssh plugin in my VSCode in an Ubuntu machine and I got a problem connecting to the remote server. The password prompt didn't appear and I couldn't enter my ssh passphrase and I suspect that's why the connection failed. Any advice? Thanks
[21:29:18.094] Spawning local server with {"serverId":1,"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-43be30dd59b7e1cc43e3ac15496de2994552e19d.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","34635","-o","ConnectTimeout=15","pipeline-azure-2.nplan.io"],"dataFilePath":"/home/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-pipeline-azure-2.nplan.io-c3f126316369cd610563c75b1b1725e0679adfb3-0.65.7/data.json"}
[21:29:18.094] Local server env: {"DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/snap/code/70/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-4ae6bcfc1164348347c6920b3ec572ba3eba795f.sock"}
[21:29:18.105] Spawned 239369
[21:29:18.301] > local-server-1> Spawned ssh, pid=239378
[21:29:18.305] stderr> OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f 31 Mar 2020
[21:29:23.099] stderr> debug1: Server host key: ssh-rsa SHA256:BJdFW33L3iusC5rckbrC9WmH7+dx5W1mC6VkyAsCFbs
[21:29:33.762] stderr> No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
[21:29:33.762] stderr>
[21:29:33.762] stderr>
[21:29:35.107] Terminating local server
[21:29:35.111] Resolver error: Error: Connecting with SSH timed out
at Function.Timeout (/home/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:64785)
at Timeout._onTimeout (/home/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:264709)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
[21:29:35.124] ------

I just deleted the .vscode-server folder on the server and voila!
Credits to: https://github.com/microsoft/vscode-remote-release/issues/3856#issuecomment-710733921

Related

vscode remote-ssh fails

Local: macOS 12.6, vscode1.72.2, remote-ssh v0.90.1 preview
Server: Tencent Cloud Lightweight Server centOS7.6
Server ssh configuration is set: AllowTcpForwarding yes
The local command line ssh connection server can be entered normally.
The error message is:
channel 2: open failed: administratively prohibited: open failed

vscode remote is stuck on acquiring lock

I am using vscode for remote development on a server. While my local ssh works perfectly and vscode too manages to connect I cannot understand why it struggles with acquiring a lock:
[15:30:21.166] Log Level: 2
[15:30:21.167] remote-ssh#0.76.1
[15:30:21.167] linux x64
[15:30:21.170] SSH Resolver called for "ssh-remote+myservername", attempt 1
[15:30:21.170] "remote.SSH.useLocalServer": true
[15:30:21.170] "remote.SSH.path": undefined
[15:30:21.170] "remote.SSH.configFile": undefined
[15:30:21.170] "remote.SSH.useFlock": true
[15:30:21.170] "remote.SSH.lockfilesInTmp": false
[15:30:21.171] "remote.SSH.localServerDownload": auto
[15:30:21.171] "remote.SSH.remoteServerListenOnSocket": false
[15:30:21.171] "remote.SSH.showLoginTerminal": false
[15:30:21.171] "remote.SSH.defaultExtensions": []
[15:30:21.171] "remote.SSH.loglevel": 2
[15:30:21.171] "remote.SSH.enableDynamicForwarding": true
[15:30:21.171] "remote.SSH.enableRemoteCommand": false
[15:30:21.173] "remote.SSH.serverPickPortsFromRange": {}
[15:30:21.173] "remote.SSH.serverInstallPath": {}
[15:30:21.182] SSH Resolver called for host: myservername
[15:30:21.182] Setting up SSH remote "myservername"
[15:30:21.185] Acquiring local install lock: /tmp/vscode-remote-ssh-71abc574-install.lock
[15:30:21.188] Looking for existing server data file at /home/pablo.jeken/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-71abc574-c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1-0.76.1/data.json
[15:30:21.189] Using commit id "c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1" and quality "stable" for server
[15:30:21.194] Install and start server if needed
[15:30:21.201] PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[15:30:21.201] Checking ssh with "ssh -V"
[15:30:21.207] > OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020
[15:30:21.218] askpass server listening on /run/user/10009775/vscode-ssh-askpass-3d1c8a273f03be7c5d0c82b4d05d7bac4a210902.sock
[15:30:21.218] Spawning local server with {"serverId":1,"ipcHandlePath":"/run/user/10009775/vscode-ssh-askpass-1cc1dcb318a81e2eccd3798a104e90247b955e4e.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","46751","-o","ConnectTimeout=15","myservername"],"serverDataFolderName":".vscode-server","dataFilePath":"/home/pablo.jeken/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-71abc574-c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1-0.76.1/data.json"}
[15:30:21.219] Local server env: {"SSH_AUTH_SOCK":"/run/user/10009775/keyring/ssh","SHELL":"/bin/bash","DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/pablo.jeken/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/home/pablo.jeken/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/10009775/vscode-ssh-askpass-3d1c8a273f03be7c5d0c82b4d05d7bac4a210902.sock"}
[15:30:21.221] Spawned 603360
[15:30:21.289] > local-server-1> Spawned ssh, pid=603368
[15:30:21.291] stderr> OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020
[15:30:21.310] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:xnBKjqpfpJS7fUOyaBfLXfFKXhrQHy0gTzx+EgsjOWE
[15:30:21.395] stderr> Server not found in Kerberos database
[15:30:21.435] stderr> Authenticated to myservername-myuni.com ([10.202.224.1]:22).
[15:30:21.515] > ready: 8065c191363a
[15:30:21.517] > Linux 4.18.0-240.1.1.el8_3.x86_64 #1 SMP Thu Nov 19 17:20:08 UTC 2020
[15:30:21.517] Platform: linux
[15:30:21.518] > /bin/bash
[15:30:21.518] Shell: bash
[15:30:21.524] > 8065c191363a: running
[15:30:21.540] > Acquiring lock on /home/pjeken/.vscode-server/bin/c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1/vscode-remote-lock.pjeken.c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
This issue is provided at the github page of vscode, but was closed without a solution.
I tried both setting remote.SSH.useFlock to false and remote.SSH.lockfilesInTmp to true as suggested in the threat, but nothing solved the problem. Either vscode got caught in a loop trying to connect with ssh or the same problem persisted (same as in the threat).
Does anyone know where the issue might be? Thanks in advance.
Update:
I tried out the flock test as suggested in the answer below. The lock cannot be solved and is permanently stuck. Therefore, I assume flock to be indeed the problem. Moving away from flock, as stated before, has not solved the problem either.
Have you tried using a shell and running flock manually?
Here's a simple example script you can use to test if flock is working.

remote ssh connection failed with this error message in output of vscode (I'm connecting from linux server 18 to mac using ssh extension)

[12:03:55.917] Log Level: 2
[12:03:55.919] remote-ssh#0.61.0
[12:03:55.919] darwin x64
[12:03:55.921] SSH Resolver called for "ssh-remote+192.168.0.108", attempt 1
[12:03:55.921] "remote.SSH.useLocalServer": true
[12:03:55.921] "remote.SSH.sshPath": ssh
[12:03:55.921] "remote.SSH.sshConfigurationFile": /Users/apple/.ssh/config
[12:03:55.922] "remote.SSH.useFlock": true
[12:03:55.922] "remote.SSH.lockfilesInTmp": true
[12:03:55.922] "remote.SSH.localServerDownload": auto
[12:03:55.922] "remote.SSH.remoteServerListenOnSocket": false
[12:03:55.922] "remote.SSH.showLoginTerminal": true
[12:03:55.922] "remote.SSH.maxReconnectionAttempts": 9007199254740991
[12:03:55.923] SSH Resolver called for host: 192.168.0.108
[12:03:55.923] Setting up SSH remote "192.168.0.108"
[12:03:55.926] Acquiring local install lock:
/var/folders/8g/jfn_yxnn63j718q8_f2fkrw00000gn/T/vscode-remote-ssh-192.168.0.108-
install.lock
[12:03:55.948] Looking for existing server data file at /Users/apple/Library/Application
Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-192.168.0.108-
940b5f4bb5fa47866a54529ed759d95d09ee80be-0.61.0/data.json
[12:03:55.952] Using commit id "940b5f4bb5fa47866a54529ed759d95d09ee80be" and quality
"stable" for server
[12:03:55.971] Install and start server if needed
[12:03:55.982] Checking ssh with "ssh -V"
[12:03:56.032] > OpenSSH_7.9p1, LibreSSL 2.7.3
[12:03:56.035] Using SSH config file "/Users/apple/.ssh/config"
[12:03:56.036] askpass server listening on
/var/folders/8g/jfn_yxnn63j718q8_f2fkrw00000gn/T/vscode-ssh-askpass-
a053265c1873c60f803ede861fc6322c4ed520cd.sock
[12:03:56.037] Spawning local server with
{"ipcHandlePath":"/var/folders/8g/jfn_yxnn63j718q8_f2fkrw00000gn/T/vscode-ssh-askpass-
220be0bb451b619d8ebcba60f7b13b9801f559f3.sock","sshCommand":"ssh","sshArgs":["-v","-T","-
D","50504","-o","ConnectTimeout=15","-
F","/Users/apple/.ssh/config","192.168.0.108"],"dataFilePath":"/Users/apple/Library/Application
Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-192.168.0.108-
940b5f4bb5fa47866a54529ed759d95d09ee80be-0.61.0/data.json"}
[12:03:56.037] Local server env:
{"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/apple/.vscode/extensions/ms-
vscode-remote.remote-ssh-0.61.0/out/local-
server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Users/apple/Desktop/Visual Studio
Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper.
(Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/apple/.vscode/extensions/ms-vscode-
remote.remote-ssh-0.61.0/out/askpass-
ssh-askpass-a053265c1873c60f803ede861fc6322c4ed520cd.sock"}
[12:03:56.041] Spawned 3077
[12:03:56.217] > local-server> Spawned ssh: 3078
[12:03:56.241] stderr> OpenSSH_7.9p1, LibreSSL 2.7.3
[12:03:56.266] stderr> Connection reset by 192.168.0.108 port 22
[12:03:56.268] > local-server> ssh child died, shutting down
[12:03:56.275] Local server exit: 0
[12:03:56.275] Received install output: OpenSSH_7.9p1, LibreSSL 2.7.3
Connection reset by 192.168.0.108 port 22
[12:03:56.276] Stopped parsing output early. Remaining text: OpenSSH_7.9p1, LibreSSL
2.7.3Connection reset by 192.168.0.108 port 22
[12:03:56.276] Failed to parse remote port from server output
[12:03:56.283] Resolver error: Error:
at Function.Create (/Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:1:82322)
at Object.t.handleInstallOutput (/Users/apple/.vscode/extensions/ms-vscode-
remote.remote-ssh-0.61.0/out/extension.js:1:78935)
at Object.t.tryInstallWithLocalServer (/Users/apple/.vscode/extensions/ms-vscode-
remote.remote-ssh-0.61.0/out/extension.js:127:102434)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async /Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:127:104499
at async Object.t.withShowDetailsEvent (/Users/apple/.vscode/extensions/ms-vscode-
remote.remote-ssh-0.61.0/out/extension.js:127:110308)
at async /Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:127:100987
at async S (/Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:127:97777)
at async Object.t.resolveWithLocalServer (/Users/apple/.vscode/extensions/ms-vscode-
remote.remote-ssh-`0.61.0`/out/extension.js:127:100636)
at async Object.t.resolve (/Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:127:108250)
at async /Users/apple/.vscode/extensions/ms-vscode-remote.remote-ssh-
0.61.0/out/extension.js:127:129627
[12:03:56.289] ------

I have delete the '.vscode-server' folder. But ssh-remote still dones't work

My system is ubuntu 16.04.
It's fine when i use ssh in terminal.
But when i use ssh-remove in vscode. There's always error about failed to ln vscode-remote-lock.root.xxxxx. \
So i delete the whole .vscode-server folder (include itself).
However the error still occurs.
Here is the log
[21:45:22.437] Log Level: 2
[21:45:22.438] remote-ssh#0.51.0
[21:45:22.438] linux x64
[21:45:22.439] SSH Resolver called for "ssh-remote+matrix5", attempt 1
[21:45:22.440] SSH Resolver called for host: matrix5
[21:45:22.440] Setting up SSH remote "matrix5"
[21:45:22.442] Acquiring local install lock: /tmp/vscode-remote-ssh-matrix5-install.lock
[21:45:22.450] Looking for existing server data file at /home/daijunjie/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-matrix5-a0479759d6e9ea56afa657e454193f72aef85bd0-0.51.0/data.json
[21:45:22.459] Using commit id "a0479759d6e9ea56afa657e454193f72aef85bd0" and quality "stable" for server
[21:45:22.464] Install and start server if needed
[21:45:22.477] Checking ssh with "ssh -V"
[21:45:22.484] > OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
[21:45:22.485] askpass server listening on /run/user/1000/vscode-ssh-askpass-66a057c15bb13b290ef0a13841206f52de4b6934.sock
[21:45:22.486] Spawning local server with {"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-2e95ed95f8d502946556d089375e3fc7c0a83a60.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","33509","-o","ConnectTimeout=15","matrix5"],"dataFilePath":"/home/daijunjie/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-matrix5-a0479759d6e9ea56afa657e454193f72aef85bd0-0.51.0/data.json"}
[21:45:22.486] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-66a057c15bb13b290ef0a13841206f52de4b6934.sock"}
[21:45:22.489] Spawned 13753
[21:45:22.570] > local-server> Spawned ssh: 13761
[21:45:22.571] stderr> OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
[21:45:22.748] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:t5baR11kNfeoUNE2DkSopt8EuiL2Yw4Ki9KjcKoITiI
[21:45:22.889] stderr> No Kerberos credentials available
[21:45:22.889] stderr>
[21:45:22.890] stderr> No Kerberos credentials available
[21:45:22.890] stderr>
[21:45:22.891] stderr>
[21:45:22.892] stderr>
[21:45:22.892] stderr> No Kerberos credentials available
[21:45:22.893] stderr>
[21:45:23.013] Got askpass request: {"request":"daijunjie#matrix5's password:"}
[21:45:23.014] Showing password prompt
[21:45:23.015] Listening for interwindow password on /run/user/1000/vscode-ssh-askpass-f7c76e17b4f9729a3485ae2ea663cb3b0ed9b124.sock
[21:45:23.015] Writing password prompt to globalState
[21:45:26.975] Got password response
[21:45:26.975] Interactor gave response: *********
[21:45:26.977] Cleaning up other-window auth server
[21:45:27.208] stderr> Authenticated to matrix5 ([172.16.30.205]:22).
[21:45:27.270] > Last failed login: Thu Sep 3 21:41:40 CST 2020 from 10.8.117.207 on ssh:notty
> There were 19 failed login attempts since the last successful login.
[21:45:27.682] > ready: fe8e17d6d674
[21:45:27.714] > Linux 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015
[21:45:27.715] Platform: linux
[21:45:27.760] > fe8e17d6d674: running
[21:45:27.804] > Acquiring lock on /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0
[21:45:27.806] > \ln /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0.target /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0
[21:45:27.810] > Installation already in progress...
> fe8e17d6d674##24##
[21:45:27.811] Received install output: fe8e17d6d674##24##
[21:45:27.812] Server installation process already in progress - waiting and retrying
[21:45:27.813] Terminating local server
[21:45:27.815] stderr> ln: 无法创建硬链接"/home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0": 文件已存在
[21:45:27.826] Local server exit: 15
[21:45:28.823] askpass server listening on /run/user/1000/vscode-ssh-askpass-306602990a24ee3d283dacc59c308749803f4079.sock
[21:45:28.824] Spawning local server with {"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-2b79fa3a864c0ae128b0977807dba070c415f490.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","33509","-o","ConnectTimeout=15","matrix5"],"dataFilePath":"/home/daijunjie/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-matrix5-a0479759d6e9ea56afa657e454193f72aef85bd0-0.51.0/data.json"}
[21:45:28.824] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-306602990a24ee3d283dacc59c308749803f4079.sock"}
[21:45:28.836] Spawned 13775
[21:45:28.925] > local-server> Spawned ssh: 13783
[21:45:28.926] stderr> OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
[21:45:29.104] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:t5baR11kNfeoUNE2DkSopt8EuiL2Yw4Ki9KjcKoITiI
[21:45:29.248] stderr> No Kerberos credentials available
[21:45:29.248] stderr>
[21:45:29.248] stderr> No Kerberos credentials available
[21:45:29.249] stderr>
[21:45:29.249] stderr>
[21:45:29.249] stderr>
[21:45:29.250] stderr> No Kerberos credentials available
[21:45:29.250] stderr>
[21:45:29.376] Got askpass request: {"request":"daijunjie#matrix5's password:"}
[21:45:29.377] Showing password prompt
[21:45:29.377] Listening for interwindow password on /run/user/1000/vscode-ssh-askpass-16359f8f4e6c647b4da0a31ef6ce7a8f10a2f8a8.sock
[21:45:29.377] Writing password prompt to globalState
[21:45:32.725] Got password response
[21:45:32.726] Interactor gave response: *********
[21:45:32.727] Cleaning up other-window auth server
[21:45:33.007] stderr> Authenticated to matrix5 ([172.16.30.205]:22).
[21:45:33.069] > Last failed login: Thu Sep 3 21:41:40 CST 2020 from 10.8.117.207 on ssh:notty
> There were 19 failed login attempts since the last successful login.
[21:45:33.519] > ready: fe8e17d6d674
[21:45:33.552] > Linux 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015
[21:45:33.553] Platform: linux
[21:45:33.597] > fe8e17d6d674: running
[21:45:33.642] > Acquiring lock on /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0
[21:45:33.644] > \ln /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0.target /home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0
[21:45:33.646] > Installation already in progress...
> fe8e17d6d674##24##
[21:45:33.647] Received install output: fe8e17d6d674##24##
[21:45:33.647] Server installation process already in progress - waiting and retrying
[21:45:33.648] Terminating local server
[21:45:33.649] stderr> ln: 无法创建硬链接"/home/daijunjie/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/vscode-remote-lock.root.a0479759d6e9ea56afa657e454193f72aef85bd0": 文件已存在
[21:45:33.661] Local server exit: 15
[21:45:34.658] askpass server listening on /run/user/1000/vscode-ssh-askpass-a481e1d41215dd72b1bfcec1ef65bf61e8af3a6f.sock
[21:45:34.659] Spawning local server with {"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-4a56ac9a4aefb156178058c9abf0f67b32b2ae5d.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","33509","-o","ConnectTimeout=15","matrix5"],"dataFilePath":"/home/daijunjie/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-matrix5-a0479759d6e9ea56afa657e454193f72aef85bd0-0.51.0/data.json"}
[21:45:34.659] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/daijunjie/.vscode/extensions/ms-vscode-remote.remote-ssh-0.51.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-a481e1d41215dd72b1bfcec1ef65bf61e8af3a6f.sock"}
[21:45:34.672] Spawned 13797
[21:45:34.765] > local-server> Spawned ssh: 13805
[21:45:34.766] stderr> OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
[21:45:34.945] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:t5baR11kNfeoUNE2DkSopt8EuiL2Yw4Ki9KjcKoITiI
[21:45:35.088] stderr> No Kerberos credentials available
[21:45:35.090] stderr>
[21:45:35.090] stderr> No Kerberos credentials available
[21:45:35.090] stderr>
[21:45:35.091] stderr>
[21:45:35.091] stderr>
[21:45:35.093] stderr> No Kerberos credentials available
[21:45:35.093] stderr>
[21:45:35.217] Got askpass request: {"request":"daijunjie#matrix5's password:"}
[21:45:35.217] Showing password prompt
[21:45:35.217] Listening for interwindow password on /run/user/1000/vscode-ssh-askpass-43041326a96864945a076333ad00ca828d430d5f.sock
[21:45:35.217] Writing password prompt to globalState
[21:45:36.737] Password dialog canceled
[21:45:36.737] Interactor signaled cancel
[21:45:36.737] Cleaning up other-window auth server
[21:45:36.778] stderr> Permission denied, please try again.
[21:45:36.851] Got askpass request: {"request":"daijunjie#matrix5's password:"}
[21:45:36.887] stderr> Permission denied, please try again.
[21:45:36.950] Got askpass request: {"request":"daijunjie#matrix5's password:"}
[21:45:36.986] stderr> Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
[21:45:36.986] > local-server> ssh child died, shutting down
[21:45:36.989] Local server exit: 0
[21:45:36.989] Received install output: OpenSSH_7.2p2 Ubuntu-4ubuntu2.10, OpenSSL 1.0.2g 1 Mar 2016
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:t5baR11kNfeoUNE2DkSopt8EuiL2Yw4Ki9KjcKoITiI
No Kerberos credentials available
No Kerberos credentials available
No Kerberos credentials available
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
[21:45:36.990] Resolver error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
[21:45:36.993] ------
I'm so confused about it. Has any run into this problem?
Is there any 'clean' way to reinstall ssh-remote?
Check your Remote-SSH version. After many attempts at trying to fix this for me, I found that downgrading Remote-SSH on VScode from 0.65.4 to 0.51.0 resolved the issue.
(User mileage may vary)

"Connection timed out" error while connecting vscode to gcloud cloud shell

I have set up the cloud shell for vscode as given in this document; however it stopped connecting to the remote shell and it was only connected once initially. No VS Code version change happened. Current VSCode version is 1.46.1
Following are the logs thrown -
[13:31:22.078] Log Level: 2
[13:31:22.086] remote-ssh#0.51.0
[13:31:22.086] win32 x64
[13:31:22.093] SSH Resolver called for "ssh-remote+cloud-shell", attempt 1
[13:31:22.094] SSH Resolver called for host: cloud-shell
[13:31:22.094] Setting up SSH remote "cloud-shell"
[13:31:23.942] Using commit id "cd9ea6488829f560dc949a8b2fb789f3cdc05f5d" and quality "stable" for server
[13:31:23.945] Install and start server if needed
[13:31:23.951] Checking ssh with "ssh -V"
[13:31:23.957] Got error from ssh: spawn ssh ENOENT
[13:31:23.958] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[13:31:23.962] Got error from ssh: spawn C:\Windows\System32\OpenSSH\ssh.exe ENOENT
[13:31:23.962] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[13:31:28.385] > OpenSSH_8.3p1, OpenSSL 1.1.1g 21 Apr 2020
[13:31:28.390] Running script with connection command: "C:\Program Files\Git\usr\bin\ssh.exe" -T -D 50396 cloud-shell bash
[13:31:28.412] Terminal shell path: C:\Windows\System32\cmd.exe
[13:31:33.205] >
[13:31:33.206] Got some output, clearing connection timeout
[13:31:54.348] > ssh: connect to host 34.87.29.174 port 6000: Connection timed out
>
[13:31:54.764] "install" terminal command done
[13:31:54.765] Install terminal quit with output: ssh: connect to host 34.87.29.174 port 6000: Connection timed out
[13:31:54.766] Received install output: ssh: connect to host 34.87.29.174 port 6000: Connection timed out
[13:31:54.768] Resolver error: The connection timed out
[13:31:54.781] ------