Difference between revisions of "SSH Using VS Code"

From UFRC
Jump to navigation Jump to search
(Created page with "Start")
 
Line 1: Line 1:
Start
+
This guide will walk you through the process of using SSH in Visual Studio Code (VS Code) to remotely connect to a server, using an SSH key. SSH is a secure protocol used for remote access to systems, and using an SSH key adds an additional layer of security.
 +
You can install VSCode at [https://code.visualstudio.com/ this page.]
 +
==Step 1: Install the Remote Development extension==
 +
The first step is to install the "Remote Development" extension in VS Code, which can be done [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh here].
 +
 
 +
Reload if necessary after it finishes installing.
 +
 
 +
==Step 2: Configure the SSH key==
 +
Next, you'll need to configure the SSH key that you created earlier. To do this, follow these steps:
 +
#In VSCode, press Ctrl + Shift + P (Windows) or Command + Shift + P (Mac) to open the command palette
 +
#Type "Remote-SSH: Open Configuration File..." and select it from the list
 +
#If you have not used the Remote Development extension before, you will be prompted to choose a "Connection Type". Choose "SSH".
 +
#This will open a file called "ssh_config". Scroll down to the "Host" section and add lines mentioned in [[Using SSH Keys To Access HPG#SSH Configuration | SSH Configuration]] if you haven't already.
 +
#Save the file and close it.

Revision as of 18:03, 30 March 2023

This guide will walk you through the process of using SSH in Visual Studio Code (VS Code) to remotely connect to a server, using an SSH key. SSH is a secure protocol used for remote access to systems, and using an SSH key adds an additional layer of security. You can install VSCode at this page.

Step 1: Install the Remote Development extension

The first step is to install the "Remote Development" extension in VS Code, which can be done here.

Reload if necessary after it finishes installing.

Step 2: Configure the SSH key

Next, you'll need to configure the SSH key that you created earlier. To do this, follow these steps:

  1. In VSCode, press Ctrl + Shift + P (Windows) or Command + Shift + P (Mac) to open the command palette
  2. Type "Remote-SSH: Open Configuration File..." and select it from the list
  3. If you have not used the Remote Development extension before, you will be prompted to choose a "Connection Type". Choose "SSH".
  4. This will open a file called "ssh_config". Scroll down to the "Host" section and add lines mentioned in SSH Configuration if you haven't already.
  5. Save the file and close it.