Main Content Region

Visual Studio Code - Lab Connection


Visual Studio Code - Lab Connection

Revised by Pedro Lorenzano Rodriguez (CSE-ITS) • January 21, 2025


Summary:

You can use Visual Studio Code to connect the the CSE Linux labs remotely and be able to modify/delete files with their interface. You should be able to easily upload and download files as well. In order to connect you will have to connect to the jump-box and then to the Linux lab machine, instructions are included below.


Initial Requirements

Linux / macOS / Windows computer that has VS Code with Remote - SSH extension installed.

  • ON VS Code, navigate to the Extensions on the left side and reach for "Remote - SSH" and install.

Initial Setup

Warning: You only need to complete this section once, the configuration will be safe for future connections.

  • Click on the Blue icon on the bottom left.

            

  • On the Command Palette, click on the "Connect to host..." option

           

  • Select "Configure SSH Hosts..."

           

  • Select your profile's ssh config, you will not need to create this file, it should already exist.
    • Example: C:\Users\Username\.ssh\config

          

  • Once you have selected your file, you can copy and paste the following on the config file.
    • Please modify the computer you would like to connect to and Replace the ID with your MyCoyote ID.
  • #Configuration File

    ###Beginning of file

    Host CSE-Jump

        Hostname cse-jump.csusb.edu

        Port 22

        #Please change COYOTEID to your actual ID number example 001234567

        User 001234567@csusb.edu

         

    #JB358-10 is an example you are welcome to choose between JB-359 0-10 and JB-358 0-10.

    Host jb358-10

        HostName jb358-10.csusb.edu

        Port 22  

        #Please change COYOTEID to your actual ID number example 001234567

        User 001234567@csusb.edu

        ProxyCommand ssh.exe -q -W %h:%p CSE-Jump

     

    ###End of File 

    • Save file

 

  • Once configuration is saved, you can navigate to the blue icon on the bottom left again and select "Connect to host."

          

          

  • Select in this case "jb358-10" and then Linux and follow the prompts for credentials

         

         

  • On the bottom left you will get this notification. Click on (details) and follow the instructions for DUO.
    • Note: You may enter 1 but not see it, once its entered press Enter/Return on your keyboard and you will receive your DUO prompt on your phone/

           

  • You will get prompted to end your password a few more times both in the terminal and Command Palette

 

  • Then Select Open Folder, you will be prompted to select your home directory for example "/home/001234567@csusb.edu/", you can select that or a specific folder you are working on.
    • Ex. "/home/001234567@csusb.edu/Dekstop/"
    • Ex. "/home/001234567@csusb.edu/CSE2020/" 

 

  • Once you select a folder you will be prompted for another password.
  • You will then confirm that you trust the author.