Thanks to visit codestin.com
Credit goes to docs.microsandbox.dev

Skip to main content
Connect VS Code to a local or cloud sandbox over SSH. Your files, terminal, and remote extensions run inside the sandbox. Before you start, install VS Code Remote-SSH and have a running sandbox with an image that meets VS Code’s Linux requirements. Alpine is not supported by Remote-SSH.

Connect to your sandbox

1

Set up SSH

Run these commands on your host. The examples use ~/.ssh/id_ed25519; use your own key path if different. If you need a key, create one with ssh-keygen -t ed25519.
Add your public key to the sandbox’s SSH keys page in the dashboard, or use an existing organization SSH key. Copy the sandbox’s SSH command, for example:Add this entry to ~/.ssh/config, replacing crimson-summit-7fa1 with your sandbox’s slug:
In another host terminal, run ssh devbox.msb. On first connection, verify the host key and type yes to trust it. Once connected, run exit.
2

Open VS Code

  1. Open the Command Palette and select Remote-SSH: Connect to Host….
  2. Select devbox.msb, then Linux if prompted.
  3. Wait for setup to finish, then use File > Open Folder… to open your project inside the sandbox.
Clone or copy your project into the sandbox first; connecting does not copy host files. Use the integrated terminal for commands and the Ports view to access apps running in the sandbox.

Troubleshooting

Check View > Output > Remote - SSH for the error. Confirm that the private key in IdentityFile matches an authorized public key. For cloud, check the sandbox slug and dashboard SSH keys. For local, keep msb ssh serve running and check that its port matches your SSH configuration.Leave Remote.SSH: Remote Server Listen On Socket disabled; use TCP forwarding.
For local sandboxes, serving a different sandbox on the same port can cause MitmPortForwardingDisabled. After verifying that the key change is expected, remove the old entry on your host:
Verify and accept the new key, then reconnect in VS Code. This command applies to the local configuration above. Investigate unexpected key changes; do not disable host-key checking.
Check Remote - SSH and Log (Remote Extension Host) in the Output panel. Verify the image’s libraries and architecture, available memory, disk space, and download access.If the terminal works but extensions fail, disable remote extensions and re-enable them one at a time. Install missing guest libraries or a compatible extension build; increase memory if logs show an out-of-memory kill.
See SSH for forwarding, custom ports, and idle timeouts.