I'm using VSCode Remote-SSH to connect to a cluster, which works normally. But approx. every few minutes I get prompted to re-enter my password, after which it works again for a few minutes. My only issue is the constant re-prompting.
Here is the Remote-SSH log of when the re-prompt occurs at [10:59:03] until I re-enter it.:
[10:58:52.489] Resolved "ssh-remote+tok06" to "port 40251"
[10:58:52.501] ------
[10:58:52.518] [Forwarding server port 40251] Got connection 1
[10:58:52.534] [Forwarding server port 40251] Got connection 2
[10:58:55.542] [Forwarding server port 40251] Got connection 3
[10:59:03.533] [Forwarding server port 40251] Got connection 4
[10:59:03.535] ------
[10:59:03.535] SSH Resolver called for "ssh-remote+tok06", attempt 2, (Reconnection)
[10:59:03.539] SSH Resolver called for host: tok06
[10:59:03.539] Setting up SSH remote "tok06"
[10:59:03.541] Acquiring local install lock: /tmp/vscode-remote-ssh-5efd2273-install.lock
[10:59:03.542] Looking for existing server data file at /afs/ipp/home/k/kope/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5efd2273-f1b07bd25dfad64b0167beb15359ae573aecd2cc-0.106.5-tr/data.json
[10:59:03.544] Found local server running: {"remoteListeningOn":{"port":42639},"osReleaseId":"sles","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/13683","platform":"linux","connectionToken":"111a1a1a-a1aa-1111-a11a-a1aa1a1a11a1","pid":23442,"ipcHandlePath":"/run/user/13683/vscode-ssh-askpass-9f88d0f1e3a9e38ab5536d68acf8b9548795a8a1.sock","socksPort":47037,"startupTime":1697446727029}
[10:59:03.544] Running server is stale. Ignoring
[10:59:03.545] Using commit id "f1b07bd25dfad64b0167beb15359ae573aecd2cc" and quality "stable" for server
[10:59:03.550] Install and start server if needed
[10:59:03.564] Using SSH config file "/afs/ipp-garching.mpg.de/home/k/kope/.ssh/config"
[10:59:03.565] askpass server listening on /run/user/13683/vscode-ssh-askpass-604080db4625349d14161b22c59748385f6dddfb.sock
[10:59:03.565] Spawning local server with {"serverId":2,"ipcHandlePath":"/run/user/13683/vscode-ssh-askpass-1af7a5cbc5382a9e62809e128254321f4ad0e0d7.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","47037","-o","ConnectTimeout=15","-F","/afs/ipp-garching.mpg.de/home/k/kope/.ssh/config","tok06"],"serverDataFolderName":".vscode-server","dataFilePath":"/afs/ipp/home/k/kope/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5efd2273-f1b07bd25dfad64b0167beb15359ae573aecd2cc-0.106.5-tr/data.json"}
[10:59:03.566] Local server env: {"SSH_AUTH_SOCK":"/run/user/13683/keyring/ssh","SHELL":"/bin/bash","DISPLAY":":10.0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/afs/ipp-garching.mpg.de/home/k/kope/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.5/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/afs/ipp-garching.mpg.de/home/k/kope/local/VSCode-linux-x64/code","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/afs/ipp-garching.mpg.de/home/k/kope/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.5/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/13683/vscode-ssh-askpass-604080db4625349d14161b22c59748385f6dddfb.sock"}
[10:59:03.574] Spawned 23498
[10:59:03.680] > local-server-2> Running ssh connection command: "-v -T -D 47037 -o ConnectTimeout=15 -F /afs/ipp-garching.mpg.de/home/k/kope/.ssh/config tok06"
[10:59:03.681] > local-server-2> Spawned ssh, pid=23508
[10:59:03.694] stderr> OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017
[10:59:03.803] stderr> debug1: Server host key: ssh-ed25519 SHA256:ymV5Xb3g9/yXN97m7P6x2YP4TKAQlHPX9jwwHgKwbJE
[10:59:03.936] Got askpass request: {"request":"Password:"}
[10:59:03.937] Showing password prompt
[10:59:03.938] Listening for interwindow password on /run/user/13683/vscode-ssh-askpass-cc36b6e8a17f8abcf543a6d1aa08aa9465a37e91.sock
[10:59:03.938] Writing password prompt to globalState
[10:59:06.547] > local-server-1> Timed out
[10:59:06.554] Local server exit: 0
[10:59:08.255] Got password response
[10:59:08.256] Interactor gave response: ***********
[10:59:08.256] Cleaning up other-window auth server
[10:59:08.385] stderr> Authenticated to tok06.bc.rzg.mpg.de ([130.183.15.209]:22).
[10:59:08.388] stderr> socket: Address family not supported by protocol
[10:59:08.688] > ----------------------------------------------------------------------------
> Mon Oct 16 10:59:08 2023
>
> Hello kope,
>
> ============================================================================
Can someone decypher this log and find out what is causing the repeated password prompts?
I tried the 'Kill VS Code Server on Host` option without effect. Also I tried in a local terminal to ssh-copy ssh key to find a way to avoid having to enter a password at all, but it seems that the cluster doesnt allow it (I am still prompted every time I connect).
I also tried enabling remoteSSH.useFlock
without success.