# Visual Studio Code (remote)
VS Code (opens new window) is a source-code editor made by Microsoft that supports features such as debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Lab users may for example use VSCode to run GPU accelerators inside their labs.
# Connecting to IaaS machine from your local machine
This guide describes a setup where you use VSCode installed on your local computer to connect and analyze data that is located inside a lab machine in HUNT Cloud.
# Requirements
Requirements
To complete this guide, you will need (1) VS Code (opens new window) installed on your local computer, and (2) a running IAAS machine inside your lab, your local (3) SSH configuration file.
Without these your will not be able to complete this guide.
# 1. Local computer configuration
Connection to your lab machine requires two adjustments to your local VSCode installation:
# 1.1 Add required extension
You will need to install the Remote-SSH
extension to the VSCode on your local computer. This is required to successfully connect to your lab machine over ssh.
- Open VSCode on your local computer
- Inside VSCode, launch VSCode Quick Open
Ctrl+P
or if on macCMD+P
- Paste the following command and press enter:
ext install ms-vscode-remote.remote-ssh
Alternatively, open the VSCode Remote SSH (opens new window) page directly, or identify the package in the extension marketsplace (opens new window) and follow the installation instructions.
# 1.2 Configure your local .ssh config file
This step configures the .ssh configuration file on your local computer.
# 2. Connect to your lab machine
This section establishes a connection between your local computer and your IAAS lab machine.
2.1 In command palette (see above), type Remote-SSH: Connect to Host
and select it from the drop-down list.
A list of connections from your .ssh/config file should appear in drop-down list.
2.2 Select your desired IAAS or blue machine from the list and press enter.
A new window will open and after a short moment you should be prompted for your IAAS machine password.
2.3 Insert your IAAS password.
2.4 On the left side of the window, select Explorer (opens new window).
You should see an option to Open Folder.
2.5 Click on the "Open Folder" button, keep default path /home/<username>
, or select your preferred path. Type IAAS machine password once more when prompted.
If all is fine, you should now see your lab machine files and selected directory.
Happy coding!
# Troubleshooting
Stumbled upon an issue and cannot find a solution here ? Get in touch with us on slack or through general request contact form.