Our company uses cloud-based development instances hosted on Google Cloud, and protected by identity-aware proxy. To access these requires that users have an active gcloud auth token, so our login script refreshes this allowing users to reauthenticate if needed.
As we have migrated from VSCode to Cursor (and MS Remote SSH plugin to Anysphere’s) we’ve seen that as Anysphere’s version of the plugin runs in a non-interactive version of the terminal this isn’t possible.
With MS, the following flags worked but are no longer supported:
Can Anysphere please add an option to run the Remote SSH session in an interactive terminal, or suggest an alternative workaround?
Steps to Reproduce
Use remote SSH plugin to log into cloud-hosted instances which require gcloud auth login as part of the login script
Observe that this fails
Observe in the logs the line: There was a problem refreshing your current auth tokens: Reauthentication failed. cannot prompt during non-interactive execution.
Expected Behavior
Plugin should be able to prompt the user to reauthenticate (via credentials, or other passkeys) and await a response.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hi @Jamie_Keene, thanks for this feature request. We are looking into how we can support this. In the meantime, are there ways to make the login non-interactive (e.g. caching the login token, so users can first authenticate in a terminal outside of Cursor?)
The Microsoft SSH extension is currently not available in cursor due to restrictions on how third-party extensions can be distributed through the Cursor marketplace.
Hi Ravi, any chance that you could give us a guide to how we could use VSCode to download the proper versions of the MS extensions and then copy them into the cursor extensions directory and modify the cursor extensions.json? I worked on this for a few hours but couldn’t quite figure out the proper recipe.
Hi @Jamie_Keene, not yet, though we are working on an update to support this.
Could you share more about the gcloud auth login configuration that you have? Is this a setting that Google offers that we could enable, or is this part of a custom workflow?
And the specific command which is now broken is: gcloud compute ssh --tunnel-through-iap
This handles both initial auth (web authn) and also reauthentication (e.g. we can just tap a yubikey to reauthenticate rather than going through the web flow, which isn’t possible using the workaround). IIUC the Anysphere plugin using the Output panel rather than an interactive Terminal limits the interactivity which the command above enables.
Hi @Jamie_Keene, thank you for your patience as we worked through this issue. We just released verison 1.0.24 of the extension, which respects the setting remote.SSH.showLoginTerminal, and when enabled, will show the terminal to establish the SSH connection. Could you try upgrading to the latest version of the extension?