← Connection guide

Connect VS Code to your mini with Remote - SSH

Set up an SSH host in Visual Studio Code, open a project on your rented mini and check that the integrated terminal runs on the remote computer.

Before you start Install desktop VS Code on the computer in front of you. In My minis, open Workspace details for your rental. Keep its SSH command and host fingerprint handy.

Screenshot walkthrough
The VS Code Welcome tab offers Open Folder and Connect to actions. View full-size screenshot ↗
Start in the Welcome tab

Open the desktop app. From Welcome you can begin without a Microsoft account. If a sign-in prompt appears, choose Continue without Signing In.

Captured in desktop VS Code on Ubuntu while working on a physical Mac mini. The terminal and folder picker show the Mac’s /Users path. Click any screenshot for the full window.

Where do the editor and your project live?

Try a small experiment. Type a line on your laptop, click Save, then ask the mini to read it back. With Microsoft’s Remote - SSH extension, the editor stays on your computer while the file lives on the mini. A single text file is all you need to try it.

When a step asks for the Command Palette, open the View menu and choose Command Palette, or press F1. Start typing the command name and select the matching result. On Windows and Linux you can also press Ctrl+Shift+P. On a Mac, press ⇧⌘P.

First, check your SSH login from this computer. →
  1. Open VS Code and make a practice folder

    Launch VS Code. If the welcome screen offers GitHub sign-in, you can choose Continue without Signing In and finish the prompts. Open the Command Palette and run Terminal: Create New Terminal. A panel opens along the bottom. This first terminal runs on your own computer.

    Copy the SSH command from Workspace details. At the end of it, add a space followed by the quoted text shown below. Press Enter. This asks the mini to create a folder in your home directory and print its location. The sample screenshots use port 2222. Keep the port from your own rental.

    ssh you@animal.loginmini.com "mkdir -p ~/mini-project && ls -d ~/mini-project"

    On the first connection, compare the entire fingerprint with the one in Workspace details before typing yes. At the password prompt, type your current machine password and press Enter. Nothing appears as you type. Look for a path ending in /mini-project, followed by your local prompt. If you need a hand with this first login, follow the SSH walkthrough.

    See screenshots for this step
    The VS Code Welcome tab offers Open Folder and Connect to actions. View full-size screenshot ↗
    Start in the Welcome tab

    Open the desktop app. From Welcome you can begin without a Microsoft account. If a sign-in prompt appears, choose Continue without Signing In.

    The Command Palette shows Terminal: Create New Terminal selected. View full-size screenshot ↗
    Open your first terminal

    Press F1 and type Terminal: Create New Terminal. Press Enter on the highlighted command.

    Local terminal waiting for confirmation of an SSH host fingerprint. View full-size screenshot ↗
    Check who answered

    Run your SSH command with the folder-creation command appended. Compare the entire SHA256 fingerprint with Workspace details before accepting.

    The terminal shows the practice folder path above the next local prompt. View full-size screenshot ↗
    Look for the project path

    Enter your machine password. Here the mini replied with /Users/miniguide/mini-project, then SSH returned to the laptop.

  2. Find the extension published by Microsoft

    Click the Extensions icon on the left. It looks like a group of squares. Search for Remote - SSH and select the result with that exact name from Microsoft. Pick Install on its details page. When the button changes to Uninstall, the extension is ready.

    See screenshots for this step
    The Extensions sidebar shows the search text and the Remote - SSH result by Microsoft. View full-size screenshot ↗
    Find Remote - SSH

    Open Extensions in the left sidebar. Choose Microsoft’s Remote - SSH search result.

    Microsoft’s Remote - SSH details with the blue Install button. View full-size screenshot ↗
    Click Install

    Check the publisher next to the extension name, then click Install on the details page.

  3. Give your mini a name in VS Code

    In the Command Palette, run Remote-SSH: Open SSH Configuration File…. Select the file inside your own user folder. On Windows it usually ends in %USERPROFILE%\.ssh\config. On macOS and Linux, look for ~/.ssh/config.

    In a new file, replace the sample entry with the block below. If you already have hosts saved, append the block on a new line. You can keep my-mini as the nickname. Copy your own hostname and machine username from Workspace details, and change the port if your rental lists a different one. Save with Ctrl+S or ⌘S.

    Host my-mini
        HostName animal.loginmini.com
        User you
        Port 22
    See screenshots for this step
    Open SSH Configuration File highlighted in the Command Palette. View full-size screenshot ↗
    Open the SSH configuration

    Press F1. Search for Remote-SSH: Open SSH Configuration File and run it.

    The file picker highlights the config under the example user’s home folder. View full-size screenshot ↗
    Choose your personal file

    Choose the config under your user folder. On this computer it’s /home/you/.ssh/config.

    Open SSH config containing Host my-mini and its example host, user and port. View full-size screenshot ↗
    Save the host entry

    This example calls the connection my-mini. Fill in the machine username and hostname from Workspace details before saving.

  4. Connect to the saved host

    Open the Command Palette again. Run Remote-SSH: Connect to Host… and choose my-mini. If a platform menu appears, choose macOS for a Mac mini or Linux for an Ubuntu mini. Type your machine password when prompted.

    The first connection may take a few minutes while VS Code installs its server in your remote account. Watch the lower-left corner. Once it reads SSH: my-mini, you can open a folder on the mini.

    See screenshots for this step
    Connect to Host selected in VS Code’s Command Palette. View full-size screenshot ↗
    Start a remote connection

    Open the Command Palette and type Remote-SSH: Connect to Host. Choose Connect to Host or Connect Current Window to Host.

    Host chooser listing my-mini above the option to add a new host. View full-size screenshot ↗
    Select my-mini

    Pick the nickname you saved in the previous step.

    Empty password box for the example machine account while VS Code opens the remote host. View full-size screenshot ↗
    Enter the machine password

    Check the account in the prompt, type its current password and press Enter. The first connection also installs VS Code Server.

    Remote welcome window with an SSH: my-mini status badge in the lower-left corner. View full-size screenshot ↗
    Find the SSH badge

    Look in the lower-left corner for SSH: my-mini. Use Open Folder in this remote window.

  5. Open the project on the mini

    In that remote window, choose Open Folder on the welcome page, or use File → Open Folder. Select mini-project in your remote home folder and confirm with OK. The title bar should now include mini-project [SSH: my-mini].

    VS Code may ask whether you trust the folder. You just created this empty practice folder yourself, so you can trust it. For a project from someone else, review its contents before allowing tasks or extensions to run.

    See screenshots for this step
    Remote Open Folder picker pointing to /Users/miniguide/mini-project/ with an OK button. View full-size screenshot ↗
    Choose the remote folder

    Select mini-project in the remote home folder and click OK.

    VS Code asks whether to trust the authors of this folder, with Trust Folder & Continue selected. View full-size screenshot ↗
    Trust the folder you created

    For your own empty practice folder, choose Trust Folder & Continue if this prompt appears.

  6. Save one line and read it back

    In Explorer on the left, hover over the project heading and click the New File icon (a page with a plus). Type hello.txt and press Enter. Write Hello from my mini, press Enter to end the line, then save the file.

    In this same window, choose Terminal → New Terminal or use the Command Palette again. Run these commands on separate lines. The first prints the project folder on the mini. The second prints the line you just saved.

    pwd
    cat hello.txt
    See screenshots for this step
    Explorer shows the new filename being entered under the remote mini-project folder. View full-size screenshot ↗
    Create hello.txt

    Use New File beside the project name in Explorer. Type hello.txt and press Enter.

    Remote editor with hello.txt open and Hello from my mini on its first line. View full-size screenshot ↗
    Save a line on the mini

    Type Hello from my mini, add a line break and save. The window title still shows the SSH connection.

    Remote terminal prints /Users/miniguide/mini-project and the saved line Hello from my mini. View full-size screenshot ↗
    Read your edit back

    In a new terminal in the remote window, run pwd and then cat hello.txt. Compare the output with the line you typed.

  7. Disconnect and return another day

    Click SSH: my-mini in the lower-left corner and choose Close Remote Connection. Next time, connect to the same saved host and reopen mini-project. Your copy of hello.txt will be waiting there.

    See screenshots for this step
    VS Code’s remote menu filtered to Close Remote Connection, with the command selected. View full-size screenshot ↗
    Close the connection

    Click the SSH badge and choose Close Remote Connection. The saved file stays on the mini.

Availability alerts

We'll let you know when a machine becomes available.

No reservation, no charge. Unsubscribe anytime.