How to Use GitHub Copilot With VS Code Remote SSH
🔍 WiseChecker

How to Use GitHub Copilot With VS Code Remote SSH

You need code completions and chat assistance while editing files on a remote server through VS Code Remote SSH. GitHub Copilot can provide these features, but only if the extension is correctly installed and authenticated on both your local and remote machines. This article explains how to set up GitHub Copilot with Remote SSH, what prerequisites are required, and how to verify that the extension is active on the remote host.

Key Takeaways: Setting Up GitHub Copilot on Remote SSH

  • VS Code Remote SSH extension: Must be installed locally to connect to the remote host.
  • GitHub Copilot extension version 1.10+: Supports remote development; install it on both local and remote machines.
  • GitHub Copilot status bar icon: Shows a checkmark when the extension is active on the remote host.

How GitHub Copilot Works With Remote SSH

GitHub Copilot is a cloud-based AI code completion tool. When you use VS Code Remote SSH, your local VS Code instance connects to a remote server. The Copilot extension runs on the remote host. It sends code context from the remote workspace to GitHub’s servers and receives suggestions. The extension must be installed on the remote machine through VS Code’s remote extension installation system. No manual installation on the server is needed. The local machine only needs the Remote SSH extension and the Copilot extension installed locally to trigger the remote installation.

Prerequisites

Before starting, confirm these items:

  • VS Code version 1.80 or later installed on your local machine.
  • Remote SSH extension installed locally.
  • An active GitHub Copilot subscription (Copilot Individual, Business, or Enterprise).
  • SSH access to the remote server with valid credentials.
  • The remote server must have internet access to reach GitHub’s API.

Steps to Enable GitHub Copilot on a Remote SSH Session

Follow these steps to install and activate GitHub Copilot on a remote host.

  1. Install the Remote SSH extension locally
    Open VS Code on your local machine. Go to the Extensions view by pressing Ctrl+Shift+X. Search for “Remote SSH” and install the extension by Microsoft.
  2. Install GitHub Copilot locally
    In the Extensions view, search for “GitHub Copilot” and install the extension. Sign in with your GitHub account when prompted. Complete the authentication flow in your browser.
  3. Connect to the remote host
    Press F1 to open the Command Palette. Type “Remote-SSH: Connect to Host” and select it. Enter the SSH connection string, for example user@hostname. Choose your SSH config file if needed. VS Code opens a new window connected to the remote host.
  4. Install GitHub Copilot on the remote host
    In the remote window, open the Extensions view. You will see a section labeled “Local – Installed” and “SSH: hostname – Installed”. Find GitHub Copilot under “Local – Installed”. Click the small cloud icon with an arrow next to the extension name. This installs Copilot on the remote host. Wait for the installation to finish.
  5. Verify Copilot is active on the remote host
    Look at the status bar in the bottom-right corner. The Copilot icon should show a checkmark. If it shows a spinning circle, wait a few seconds. Open a file from the remote workspace and start typing. You should see gray ghost text suggestions appear.

Common Issues and Limitations

Copilot Does Not Show Suggestions After Remote Installation

If ghost text does not appear, the extension may not be authenticated on the remote host. Open the Command Palette with F1, type “GitHub Copilot: Sign In” and select it. Complete the sign-in process again. This re-authenticates the extension on the remote side.

Copilot Icon Shows a Warning Triangle

A yellow triangle means the extension is disabled on the remote host. Open the Extensions view, find GitHub Copilot under “SSH: hostname – Installed”, and click the Enable button. If the button is not visible, reload the remote window using the Command Palette command “Developer: Reload Window”.

Copilot Chat Not Available on Remote Host

GitHub Copilot Chat requires a separate extension. Install GitHub Copilot Chat locally the same way you installed Copilot. Then click the cloud icon to install it on the remote host. After installation, open the Chat view by pressing Ctrl+Shift+I. The chat panel should appear in the remote window.

Slow Suggestions on Remote Connection

Suggestions may lag if the remote server has high latency to GitHub’s servers. Test by running ping api.github.com from the remote terminal. Latency above 100 ms can cause delays. Consider using a server closer to GitHub’s data centers or check your network configuration.

GitHub Copilot Local vs Remote: Feature Comparison

Item Local VS Code Remote SSH
Extension location Runs on local machine Runs on remote host after cloud install
Authentication One-time sign-in via browser Requires separate sign-in on remote host
Code context sent From local workspace From remote workspace
Network requirement Local internet access Remote host must have internet access
Copilot Chat Available as separate extension Must be installed separately on remote

GitHub Copilot works on Remote SSH sessions once the extension is installed on the remote host through VS Code’s cloud install feature. After completing the steps above, you can use inline completions and Copilot Chat on any file stored on the remote server. For teams using Copilot Business, verify that the remote host’s outbound traffic is allowed to api.github.com. To further improve performance, configure your SSH config file with the option “ServerAliveInterval 60” to keep the connection stable during long coding sessions.