Skip to main content

Connect to Cloud Container Instance via SSH in Local VS Code

Updated at: 2025-11-27 15:38:25

Visual Studio Code (VS Code) is a free, open-source code editor from Microsoft. It includes an integrated terminal and a rich extension ecosystem. This section explains how to connect to a Cloud Container Instance (CCI) via SSH from your local VS Code environment for development and debugging.

Prerequisites

  • A CCI has been created and is in the “Running” state. For detailed steps, see Create Cloud Container Instance.
  • VS Code is installed on your local machine.

Operation Steps

Step 1: Copy the SSH Connection Command and Password

  1. Sign in to the Console and Choose "Product" > "Computing" > "Cloud Container Instance" to enter the CCI page.

  2. Click "Cloud Container Management" to open the CCI list, and select the AI Data Center in the upper-right corner. alt text

  3. Under the Container List tab, locate the target CCI and click the "Access Credentials" icon.

    alt text

  4. In the dialog box, copy the SSH connection command and password.

    alt text

Step 2: Connect from Local VS Code

  1. Open VS Code. On the Welcome page, select ""Connect to…"", then choose ""Connect to Host… Remote-SSH"" from the command palette.

    alt text

  2. If prompted, "install the Remote - SSH extension".

    alt text

    After installation, click "Add New SSH Host".

    alt text

  3. Enter the SSH command to connect.

    Paste the SSH command copied in Step 1 into the input field, press "Enter", and select an SSH configuration file. VS Code will start the remote connection process and display a connection notification in the lower right corner.

    alt text

    alt text

  4. Establish the connection.

    In the connection prompt, click Connect, then enter the SSH password copied in Step 1.

    alt text

    alt text

    After authentication, VS Code establishes an SSH connection to the CCI and automatically opens its working directory.

    alt text