> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gpuhub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# VsCode

> Learn about developing remotely using VSCode.

<img src="https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-vscode.png?fit=max&auto=format&n=r1V0ko0l9sh4RwWM&q=85&s=1c0e2e470c645e9c813436f6740095d9" alt="" width="64" height="64" data-path="images/logo-vscode.png" />

<Warning>
  If you use VSCode to directly run or execute training programs in the terminal, make sure to [start a daemon process with tools like screen or tmux](/container-instance/run-in-background) after debugging is complete. This ensures that the program execution is not affected by SSH connection interruptions!
</Warning>

<Card title="VScode Official Documentatione" icon="book-open" horizontal href="https://code.visualstudio.com/docs/remote/ssh-tutorial">
  []()
</Card>

Work with GPUhub:

Before you start, you need to have VSCode installed. Additionally, you should:

1. **Rent and power on an instance** on GPUhub, and obtain the SSH login information for the instance (login command and password).
2. **Install the VSCode Remote Development extension** on your local machine (Remote-SSH configuration is required).

## 1. Log in to GPUhub and select the powered-on instance

Obtain SSH Login Information

<img src="https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-entrance.png?fit=max&auto=format&n=hau6BtaiLdxackoK&q=85&s=adbb16ae2c4c8ec32175733155fa34aa" alt="" width="1478" height="448" data-path="images/ssh-entrance.png" />

## 2. Configure Remote-SSH in your local VSCode

If you have already installed the **Remote-SSH** extension in your local VSCode development tool, you can skip this step and proceed directly to \[Step 3].

<img src="https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-extension.png?fit=max&auto=format&n=yLmjMPcqL-OhC9CD&q=85&s=6247de5dd0b74d729b3384e8640dcd85" alt="" width="2880" height="1750" data-path="images/bestpractices-vsccode-extension.png" />

## 3. Establish an SSH connection and log in to your remotely rented instance

Click through as indicated in the illustration to complete adding an SSH host.

<img src="https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-1.png?fit=max&auto=format&n=yLmjMPcqL-OhC9CD&q=85&s=6960eaee7bba45ec6a79c75f62f3cd60" alt="" width="2880" height="1750" data-path="images/bestpractices-vsccode-connect-1.png" />

Retrieve and copy the login information for your instance.

<img src="https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-2.png?fit=max&auto=format&n=yLmjMPcqL-OhC9CD&q=85&s=04502bc376b788b4dc4c821a5771a240" alt="" width="2880" height="666" data-path="images/bestpractices-vsccode-connect-2.png" />

Login Command:

The illustration uses `ssh -p 38909 root@region-1.gpuhub.com` as an example. Press the Enter key to continue the operation.

<Note>
  If there is a "space" at the end of this ssh command, please remove it, otherwise you may not be able to log in.
</Note>

<img src="https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-3.png?fit=max&auto=format&n=yLmjMPcqL-OhC9CD&q=85&s=300f15e792e465ab9479c13af09e7e82" alt="" width="2880" height="654" data-path="images/bestpractices-vsccode-connect-3.png" />

After pressing Enter, a prompt to customize the SSH config file may appear; you can **ignore it**. Simply press Enter again.

You may soon be presented with options to select the remote server's operating system, whether it's Windows, Linux, or Mac. **Please choose Linux**.

<img src="https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-4.png?fit=max&auto=format&n=yLmjMPcqL-OhC9CD&q=85&s=3ff61aedab7c5b196ed8eb5596624080" alt="" width="2880" height="537" data-path="images/bestpractices-vsccode-connect-4.png" />

Enter the password and wait for the SSH login to complete.

## 4. Select your code directory

The example code has already been uploaded to the instance's directory. If you haven't uploaded your resources yet, you can refer to the sections on [SCP for remote file](/data/upload-data#remote-copy-via-scp) copying or [JupyterLab](/data/upload-data#uploading-data-with-jupyterlab) to upload your code.

<Note>
  Recommendation: When developing code in VSCode, you can configure the appropriate interpreter based on the programming language you are using.
</Note>
