microsoft / microsoft/vscode-remote-release
remote-ssh closes the SSH session after laptop wakes up from sleep even though the session could stay up
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
Logs taken with remote.SSH.useLocalServer=false
[13:40:14.762] Log Level: 2
[13:40:14.768] Opening exec server for ssh-remote+my-remote-dev-vm
[13:40:14.781] VS Code version: 1.108.2
[13:40:14.781] Remote-SSH version: remote-ssh@0.122.0
[13:40:14.781] darwin arm64
[13:40:14.785] Initizing new exec server for ssh-remote+my-remote-dev-vm
[13:40:14.786] Acquiring local install lock: /var/folders/w5/c8plv88d1njcb7d012z7lbnh0000gn/T/vscode-remote-ssh-30ee4934-install.lock
[13:40:14.787] Looking for existing server data file at /Users/tsuna/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-30ee4934-c9d77990917f3102ada88be140d28b038d1dd7c7-0.122.0-es/data.json
[13:40:14.787] No existing data file
[13:40:14.788] Using commit id "c9d77990917f3102ada88be140d28b038d1dd7c7" and quality "stable" for server
[13:40:14.788] Extensions to install:
[13:40:14.790] Install and start server if needed
[13:40:14.794] PATH: /opt/homebrew/anaconda3/condabin:/opt/homebrew/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/tsuna/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/opt/pmk/env/global/bin
[13:40:14.794] Checking ssh with "ssh -V"
[13:40:14.800] > OpenSSH_10.0p2, LibreSSL 3.3.6
[13:40:14.802] askpass server listening on /var/folders/w5/c8plv88d1njcb7d012z7lbnh0000gn/T/vscode-ssh-askpass-067e15a569f58c06675d6a8365ba81a13864fc38.sock
[13:40:14.802] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/w5/c8plv88d1njcb7d012z7lbnh0000gn/T/vscode-ssh-askpass-3eb8c110c32cbc81a896974b40b77fd7ed2a9b98.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","62449","-o","ConnectTimeout=15","my-remote-dev-vm"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/tsuna/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-30ee4934-c9d77990917f3102ada88be140d28b038d1dd7c7-0.122.0-es/data.json"}
[13:40:14.802] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.18QYvSsGeJ/Listeners","SHELL":"/bin/zsh","DISPLAY":":0.0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/tsuna/.vscode/extensions/ms-vscode-remote.remote-ssh-0.122.0/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":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/tsuna/.vscode/extensions/ms-vscode-remote.remote-ssh-0.122.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/w5/c8plv88d1njcb7d012z7lbnh0000gn/T/vscode-ssh-askpass-067e15a569f58c06675d6a8365ba81a13864fc38.sock"}
[13:40:14.803] Spawned 81186
[13:40:14.803] Using connect timeout of 17 seconds
[13:40:14.905] > local-server-1> Running ssh connection command: ssh -v -T -D 62449 -o ConnectTimeout=15 my-remote-dev-vm
[13:40:14.907] > local-server-1> Spawned ssh, pid=81194
[13:40:15.512] stderr> debug1: Server host key: ssh-ed25519 SHA256:xxx
[13:40:16.183] stderr> Authenticated to my-remote-dev-vm (via proxy) using "publickey".
[13:40:16.503] > Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-164-generic x86_64)
>
> * Documentation: https://help.ubuntu.com
> * Management: https://landscape.canonical.com
> * Support: https://ubuntu.com/pro
>
> System information as of Tue Jan 27 12:39:50 PM UTC 2026
>
> System load: 0.13 Processes: 501
> Usage of /: 5.7% of 9.61TB Users logged in: 1
> Memory usage: 12% IPv4 address for enp3s0: A.B.C.D
> Swap usage: 0%
>
> * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
> just raised the bar for easy, resilient and secure K8s cluster deployment.
>
> https://ubuntu.com/engage/secure-kubernetes-at-the-edge
>
> Expanded Security Maintenance for Applications is not enabled.
>
> 53 updates can be applied immediately.
> To see these additional updates run: apt list --upgradable
>
> 7 additional security updates can be applied with ESM Apps.
> Learn more about enabling ESM Apps service at https://ubuntu.com/esm
>
> New release '24.04.3 LTS' available.
> Run 'do-release-upgrade' to upgrade to it.
>
[13:40:16.664] > ready: cb38a670b4ed
[13:40:16.825] > Linux 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025
[13:40:16.826] Platform: linux
[13:40:16.986] > /usr/bin/zsh
[13:40:16.986] Parent Shell: zsh
[13:40:16.986] Parent Shell pid: 81186
[13:40:16.987] Waiting for subshell to start
[13:40:17.042] Waiting for subshell to start
[13:40:17.097] Waiting for subshell to start
[13:40:17.153] Waiting for subshell to start
[13:40:17.200] > 2337688
[13:40:17.200] stdout -> '2337688'
[13:40:17.200] sub-process detected
[13:40:17.257] > 2337688
[13:40:17.310] > 2337688
[13:40:17.365] > cb38a670b4ed: running
> Script executing under PID: 2337688
[13:40:17.373] > Found existing installation at /home/benoit/.vscode-server...
> Starting VS Code CLI...
[13:40:17.374] > Removing old logfile at /home/benoit/.vscode-server/.cli.c9d77990917f3102ada88be140d28b038d1dd7c7.log
[13:40:17.376] > Spawned remote CLI: 2337706
[13:40:17.378] > Waiting for server log...
[13:40:17.412] > cb38a670b4ed: start
> listeningOn==127.0.0.1:40987==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/5182==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==38==
> execServerToken==xxx==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK==/tmp/ssh-XXXXy1cLWr/agent.2337678==
> cb38a670b4ed: end
[13:40:17.412] Received install output:
listeningOn==127.0.0.1:40987==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/5182==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==38==
execServerToken==xxx==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK==/tmp/ssh-XXXXy1cLWr/agent.2337678==
[13:40:17.413] Remote server is listening on port 40987
[13:40:17.413] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":40987},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"/tmp/ssh-XXXXy1cLWr/agent.2337678","tmpDir":"/run/user/5182","platform":"linux","execServerToken":"xxx"},"serverStartTime":38,"installUnpackCode":""}
[13:40:17.413] Persisting server connection details to /Users/tsuna/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-30ee4934-c9d77990917f3102ada88be140d28b038d1dd7c7-0.122.0-es/data.json
[13:40:17.414] Starting forwarding server. local port 62455 -> socksPort 62449 -> remotePort 40987
[13:40:17.414] Forwarding server listening on port 62455
[13:40:17.414] Waiting for ssh tunnel to be ready
[13:40:17.415] [Forwarding server port 62455] Got connection 0
[13:40:17.415] Tunneled port 40987 to local port 62455
[13:40:17.415] Resolved "ssh-remote+my-remote-dev-vm" to "port 62455"
[13:40:17.415] Resolving exec server at port 62455
[13:40:17.416] [Forwarding server port 62455] Got connection 1
[13:40:17.907] Exec server for ssh-remote+my-remote-dev-vm created and cached
[13:40:17.908] No hints found in the recent session.
[13:45:08.712] Opening exec server for ssh-remote+my-remote-dev-vm
[13:45:08.931] Verified and reusing cached exec server for ssh-remote+my-remote-dev-vm
[13:45:08.931] No hints found in the recent session.
[13:48:28.435] > local-server-1> Timed out
[13:48:28.437] Exec server for ssh-remote+my-remote-dev-vm closed (gracefully)
[13:48:28.446] Server delay-shutdown request failed: socket hang up
[13:48:28.446] Local server exit: 0
Logs taken with remote.SSH.useLocalServer=true
[14:11:36.781] Log Level: 2
[14:11:36.787] Opening exec server for ssh-remote+my-remote-dev-vm
[14:11:36.800] VS Code version: 1.108.2
[14:11:36.800] Remote-SSH version: remote-ssh@0.122.0
[14:11:36.800] darwin arm64
[14:11:36.804] Initizing new exec server for ssh-remote+my-remote-dev-vm
[14:11:36.805] Using commit id "c9d77990917f3102ada88be140d28b038d1dd7c7" and quality "stable" for server
[14:11:36.805] Extensions to install:
[14:11:36.807] Install and start server if needed
[14:11:40.858] PATH: /opt/homebrew/anaconda3/condabin:/opt/homebrew/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/tsuna/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/opt/pmk/env/global/bin
[14:11:40.858] Checking ssh with "ssh -V"
[14:11:40.866] > OpenSSH_10.0p2, LibreSSL 3.3.6
[14:11:40.869] Running script with connection command: ssh -T -D 63099 -o ConnectTimeout=15 'my-remote-dev-vm' sh
[14:11:40.869] Generated SSH command: 'ssh -T -D 63099 -o ConnectTimeout=15 'my-remote-dev-vm' sh << 'EOSSH'
<inline script removed for brevity>
EOSSH'
[14:11:40.870] Using connect timeout of 17 seconds
[14:11:41.060] > 2026/01/27 14:11:41 WARNING: Skipping hostname verification (certificate is still verified)
[14:11:41.061] Got some output, clearing connection timeout
[14:11:43.061] > af1a6df16ff5: running
> Script executing under PID: 2358206
[14:11:43.094] > Found existing installation at /home/benoit/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /home/benoit/.vscode-server/.cli.c9d77990917f3102ada88be140d28b038d1dd7c7.log
> Spawned remote CLI: 2358231
> Waiting for server log...
[14:11:43.110] > af1a6df16ff5: start
> listeningOn==127.0.0.1:35829==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/5182==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==38==
> execServerToken==xxx==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK==/tmp/ssh-XXXXmPfsBE/agent.2358205==
> af1a6df16ff5: end
[14:11:43.111] Received install output:
listeningOn==127.0.0.1:35829==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/5182==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==38==
execServerToken==xxx==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK==/tmp/ssh-XXXXmPfsBE/agent.2358205==
[14:11:43.112] Remote server is listening on port 35829
[14:11:43.112] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":35829},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"/tmp/ssh-XXXXmPfsBE/agent.2358205","tmpDir":"/run/user/5182","platform":"linux","execServerToken":"xxx"},"serverStartTime":38,"installUnpackCode":""}
[14:11:43.114] Starting forwarding server. local port 63143 -> socksPort 63099 -> remotePort 35829
[14:11:43.114] Forwarding server listening on port 63143
[14:11:43.114] Waiting for ssh tunnel to be ready
[14:11:43.115] Tunneled port 35829 to local port 63143
[14:11:43.115] Resolved "ssh-remote+my-remote-dev-vm" to "port 63143"
[14:11:43.115] Resolving exec server at port 63143
[14:11:43.116] [Forwarding server port 63143] Got connection 0
[14:11:43.117] [Forwarding server port 63143] Got connection 1
[14:11:43.630] Exec server for ssh-remote+my-remote-dev-vm created and cached
[14:11:43.631] No hints found in the recent session.
[14:14:04.546] Opening exec server for ssh-remote+my-remote-dev-vm
[14:14:07.575] Existing exec server for ssh-remote+my-remote-dev-vm timed out
[14:14:07.575] Initizing new exec server for ssh-remote+my-remote-dev-vm
[14:14:07.579] Using commit id "c9d77990917f3102ada88be140d28b038d1dd7c7" and quality "stable" for server
[14:14:07.579] Extensions to install:
[14:14:07.587] Install and start server if needed
[14:14:07.592] Running script with connection command: ssh -T -D 63215 -o ConnectTimeout=15 'my-remote-dev-vm' sh
[14:14:07.592] Generated SSH command: 'ssh -T -D 63215 -o ConnectTimeout=15 'my-remote-dev-vm' sh << 'EOSSH'
<inline script removed for brevity>
EOSSH'
[14:14:07.592] Using connect timeout of 17 seconds
[14:14:08.683] > 2026/01/27 14:14:07 WARNING: Skipping hostname verification (certificate is still verified)
[14:14:08.684] Got some output, clearing connection timeout
[14:16:33.919] "install" terminal command done
[14:16:33.920] Install terminal quit with output: 2026/01/27 14:14:07 WARNING: Skipping hostname verification (certificate is still verified)
[14:16:33.920] Received install output: 2026/01/27 14:14:07 WARNING: Skipping hostname verification (certificate is still verified)
[14:16:33.921] WARN: $PLATFORM is undefined in installation script output. Errors may be dropped.
[14:16:33.922] Failed to parse remote port from server output
[14:16:33.922] Exec server for ssh-remote+my-remote-dev-vm failed: Error
[14:16:33.922] Error opening exec server for ssh-remote+my-remote-dev-vm: Error
[14:16:33.923] No hints found in the recent session.
Other failure mode:
[14:27:41.663] Log Level: 2
[14:27:41.669] Opening exec server for ssh-remote+my-remote-dev-vm
[14:27:41.681] VS Code version: 1.108.2
[14:27:41.681] Remote-SSH version: remote-ssh@0.122.0
[14:27:41.681] darwin arm64
[14:27:41.685] Initizing new exec server for ssh-remote+my-remote-dev-vm
[14:27:41.686] Using commit id "c9d77990917f3102ada88be140d28b038d1dd7c7" and quality "stable" for server
[14:27:41.686] Extensions to install:
[14:27:41.688] Install and start server if needed
[14:27:41.691] PATH: /opt/homebrew/anaconda3/condabin:/opt/homebrew/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/tsuna/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/opt/pmk/env/global/bin
[14:27:41.691] Checking ssh with "ssh -V"
[14:27:41.696] > OpenSSH_10.0p2, LibreSSL 3.3.6
[14:27:41.698] Running script with connection command: ssh -T -D 63471 -o ConnectTimeout=15 'my-remote-dev-vm' sh
[14:27:41.698] Generated SSH command: 'ssh -T -D 63471 -o ConnectTimeout=15 'my-remote-dev-vm' sh << 'EOSSH'
<inline script removed for brevity>
EOSSH'
[14:27:41.698] Using connect timeout of 17 seconds
[14:27:42.990] > 2026/01/27 14:27:42 WARNING: Skipping hostname verification (certificate is still verified)
[14:27:42.990] Got some output, clearing connection timeout
[14:27:45.412] > 02a6c8d05c23: running
> Script executing under PID: 2375843
[14:27:45.419] > Found existing installation at /home/benoit/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /home/benoit/.vscode-server/.cli.c9d77990917f3102ada88be140d28b038d1dd7c7.log
> Spawned remote CLI: 2375861
[14:27:45.427] > Waiting for server log...
[14:27:45.459] > Waiting for server log...
[14:27:45.493] > 02a6c8d05c23: start
> listeningOn==127.0.0.1:44325==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/5182==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==73==
> execServerToken==xxx==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK==/tmp/ssh-XXXXxDbwOO/agent.2375842==
> 02a6c8d05c23: end
[14:27:45.494] Received install output:
listeningOn==127.0.0.1:44325==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/5182==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==73==
execServerToken==xxx==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK==/tmp/ssh-XXXXxDbwOO/agent.2375842==
[14:27:45.494] Remote server is listening on port 44325
[14:27:45.495] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":44325},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"/tmp/ssh-XXXXxDbwOO/agent.2375842","tmpDir":"/run/user/5182","platform":"linux","execServerToken":"xxx"},"serverStartTime":73,"installUnpackCode":""}
[14:27:45.497] Starting forwarding server. local port 63475 -> socksPort 63471 -> remotePort 44325
[14:27:45.497] Forwarding server listening on port 63475
[14:27:45.497] Waiting for ssh tunnel to be ready
[14:27:45.498] Tunneled port 44325 to local port 63475
[14:27:45.498] Resolved "ssh-remote+my-remote-dev-vm" to "port 63475"
[14:27:45.498] Resolving exec server at port 63475
[14:27:45.499] [Forwarding server port 63475] Got connection 0
[14:27:45.499] [Forwarding server port 63475] Got connection 1
[14:27:45.991] Exec server for ssh-remote+my-remote-dev-vm created and cached
[14:27:45.991] No hints found in the recent session.
[14:30:14.310] Opening exec server for ssh-remote+my-remote-dev-vm
[14:30:17.337] Existing exec server for ssh-remote+my-remote-dev-vm timed out
[14:30:17.338] Initizing new exec server for ssh-remote+my-remote-dev-vm
[14:30:17.341] Using commit id "c9d77990917f3102ada88be140d28b038d1dd7c7" and quality "stable" for server
[14:30:17.341] Extensions to install:
[14:30:17.348] Install and start server if needed
[14:30:17.353] Running script with connection command: ssh -T -D 63540 -o ConnectTimeout=15 'my-remote-dev-vm' sh
[14:30:17.354] Generated SSH command: 'ssh -T -D 63540 -o ConnectTimeout=15 'my-remote-dev-vm' sh << 'EOSSH'
<inline script removed for brevity>
EOSSH'
[14:30:17.354] Using connect timeout of 17 seconds
[14:30:18.465] > 2026/01/27 14:30:17 WARNING: Skipping hostname verification (certificate is still verified)
[14:30:18.466] Got some output, clearing connection timeout
[14:33:39.000] > Error: timeout: no recent network activity
> Connection closed by UNKNOWN port 65535
[14:33:39.247] "install" terminal command done
[14:33:39.247] Install terminal quit with output: Connection closed by UNKNOWN port 65535
[14:33:39.247] Received install output: Connection closed by UNKNOWN port 65535
[14:33:39.248] WARN: $PLATFORM is undefined in installation script output. Errors may be dropped.
[14:33:39.248] Failed to parse remote port from server output
[14:33:39.249] Exec server for ssh-remote+my-remote-dev-vm failed: Error
[14:33:39.249] Error opening exec server for ssh-remote+my-remote-dev-vm: Error
[14:33:39.249] No hints found in the recent session.
Expected Behavior
Currently vscode remote-ssh seems to close the SSH session as soon as I wake my laptop from sleep, despite the fact that the connection could survive the entire sleep/wake cycle including VPN disconnect/reconnect. My interactive SSH sessions stay up throughput, only vscode remote-ssh disconnects. There is no knob to configure this and the extension is shockingly closed source so I can't fix it myself.
Actual Behavior
vscode remote-ssh closes the SSH session when the laptop wakes from sleep
Steps To Reproduce
- Launch vscode on a remote server with the remote-ssh extension
- Close laptop lid to put laptop to sleep
- Wait a couple minutes
- Reopen laptop lid
- vscode immediately disconnects upon waking up from sleep, despite the fact that the SSH session could've survived the sleep period
Anything else?
Annotated timeline of the remote-ssh logs taken with remote.SSH.useLocalServer=false (the issue happens regardless of whether or not this knob is true or false but I included full logs for both cases above).
[13:11:54.525] Log Level: 2
[13:11:54.531] Opening exec server for ssh-remote+my-remote-dev-vm
[13:11:54.532] VS Code version: 1.108.2
[13:11:54.532] Remote-SSH version: remote-ssh@0.122.0
[13:11:54.532] darwin arm64
[13:11:54.535] Initizing new exec server for ssh-remote+my-remote-dev-vm
[...]
[13:11:54.550] Spawned 75111
[13:11:54.551] Using connect timeout of 17 seconds
[13:11:54.611] > local-server-1> Running ssh connection command: ssh -v -T -D 61691 -o ConnectTimeout=15 my-remote-dev-vm
[13:11:54.612] > local-server-1> Spawned ssh, pid=75119
[13:11:55.347] stderr> debug1: Server host key: ssh-ed25519 SHA256:XXX
[13:11:55.685] stderr> Nexthop Developer System my-remote-dev-vm: IP a.b.c.d
[13:11:56.016] stderr> Authenticated to my-remote-dev-vm (via proxy) using "publickey".
[13:11:56.487] > Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-164-generic x86_64)
[...]
[13:11:57.902] Exec server for ssh-remote+my-remote-dev-vm created and cached
[13:11:57.903] No hints found in the recent session.
// ~13:13:38 laptop lid closed
[13:13:38.446] Opening exec server for ssh-remote+my-remote-dev-vm // why is this happening because I closed the laptop lid?
[13:13:41.461] Existing exec server for ssh-remote+my-remote-dev-vm timed out
[13:13:41.461] Initizing new exec server for ssh-remote+my-remote-dev-vm
[...]
[13:13:41.479] Spawned 75482
[13:13:41.480] Using connect timeout of 17 seconds
[13:13:41.557] > local-server-2> Running ssh connection command: ssh -v -T -D 61748 -o ConnectTimeout=15 my-remote-dev-vm
[13:13:41.558] > local-server-2> Spawned ssh, pid=75490
// local VPN log: P44620-T26963 01/27/2026 13:13:41:892 Debug(7806): NetworkConnectionMonitorThread: m_state = 0, m_bOnDemand=0, m_bAgentEnabled=1, m_bJustResumed is 0, m_bHibernate is 1, m_bAgentEnabled is 1, m_bDisconnect is 0, IsConnected() is 1, IsVPNInRetry() is 0.
<laptop asleep>
// ~13:16:26 laptop lid open
[13:16:26.284] Terminating local server
[13:16:26.285] Exec server for ssh-remote+my-remote-dev-vm failed: Error: Connecting with SSH timed out
[13:16:26.285] Error opening exec server for ssh-remote+my-remote-dev-vm: Error: Connecting with SSH timed out
[13:16:26.285] No hints found in the recent session.
[13:16:26.297] Local server exit: 15
// local VPN log: P44620-T259 01/27/2026 13:16:26:354 Info ( 763): Received wake notification
// local VPN log: P44620-T259 01/27/2026 13:16:26:354 Debug(8291): HandleResumeCallback calls ProcessServerSleep
// local VPN log: P40296-T259 01/27/2026 13:16:26:361 Info (1088): receiveWakeNote: GPA wakes up.
[13:16:26.509] > local-server-1> Timed out
[13:16:26.512] Local server exit: 0
// VPN reconnects quickly, vscode session could've continued uninterrupted if vscode had not closed the SSH session
Need a knob to configure the keepalive interval (or disable keepalives altogether) and ensure vscode remote-ssh doesn't close the SSH session.
Environment:
Version: 1.108.2 (Universal)
Commit: c9d77990917f3102ada88be140d28b038d1dd7c7
Date: 2026-01-21T13:52:09.270Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0
Extension ms-vscode-remote.remote-ssh version 0.122.0 (part of ms-vscode-remote.vscode-remote-extensionpack version 0.26.0).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Remote-SSH: Show Log entry point and compare behavior with remote.SSH.useLocalServer set to both values, using the laptop sleep and wake cycle described in the issue. Done means the SSH session remains usable after wake when the connection can stay up, with logs showing the resulting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100