# Use Visual Studio Code with Q Blocks instances

{% hint style="info" %}
Setup time less than 5 minutes
{% endhint %}

***Visual Studio Code*** is a code editor redefined and optimized for building and debugging modern web and cloud applications.

It is commonly referred to as VS Code and is a source-code editor made by Microsoft for Windows, Linux and macOS.

Q Blocks instances can be easily accessed through VSCode to support coding and development setup for your teams.

#### Pre-requisites:

* Enable TCP Forwarding in Q Blocks instance sshd\_config
* Set Host Information in local system’s SSH config

### 1. Enable TCP Forwarding in Q Blocks instance sshd\_config:

Visual Studio Code needs TCP Forwarding to work properly.

TCP forwarding is by default disabled in Q Blocks instance sshd configuration file for security reasons.

To change this setting, run the following commands as qblocks user in your Q Blocks instance:

```bash
sudo sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
sudo systemctl restart sshd
```

This will Allow TCP forwarding and then restart the SSH Daemon.

### **2. Set Host Information in local system’s SSH config:**

SSH config file contains the information of the remote hosts that you want to access from your local computer.

VScode saves these remote hosts in the “REMORE EXPLORER” tab, so you don’t have to re-enter the ssh information next time and thus access the remote host from the VSCode on your local system easily.

Simply add the following the information in your ssh config file present at: \~/.ssh/config location

```bash
Host qblocks-instance
  HostName HOST_URL
  IdentityFile /PATH/TO/KEYFILE
  User USER
  Port SSH_PORT
```

Information such as SSH\_PORT, HOST\_URL, USER can be easily obtained by clicking on “Connect” option on your instance and then selecting the SSH information.

As seen in the example image below:

* HOST\_URL = jeu.qblocks.cloud
* SSH\_PORT = 57231
* USER = qblocks (or any new user that you created)

Please note: This is an example. The information will be different for your instance.

<figure><img src="/files/gPrFtU4gY14zqKwksyit" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
Please ensure the ssh key has 600 permissions set.
{% endhint %}

🚀  Once configured, you can simply go to your Visual studio application and then select the qblocks-instance ssh target under the “REMORE EXPLORER” tab and try connecting to it.

Please reach out to us at <support@qblocks.cloud> if you face any difficulty.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qblocks.cloud/q-blocks-how-to-guide/use-visual-studio-code-with-q-blocks-instances.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
