# Connecting to the ‘delta.cs.uwindsor.ca’ Server via SSH through Visual Studio Code

> This article was contributed by **Avinash Karhana** (karhanaa@uwindsor.ca). Thank you!

##### <span class="TextRun SCXW81384774 BCX8" data-contrast="none" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8" data-ccp-parastyle="heading 2">Prerequisites</span></span>

1. **<span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">\*\*Visual Studio Code (VS </span><span class="NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW81384774 BCX8">Code)\*</span><span class="NormalTextRun SCXW81384774 BCX8">\*</span></span>**<span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8"> installed. If you </span><span class="NormalTextRun SCXW81384774 BCX8">don't</span><span class="NormalTextRun SCXW81384774 BCX8"> have it, </span><span class="NormalTextRun SCXW81384774 BCX8">download</span><span class="NormalTextRun SCXW81384774 BCX8"> and install it from </span></span>[<span class="TextRun Underlined SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">https://code.visualstudio.com</span></span>](https://code.visualstudio.com)<span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">.</span></span><span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}"> </span>
2. **<span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">\*\*Remote - SSH Extension\*\*</span></span>**<span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8"> for VS Code installed. </span></span><span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}"> </span>
    - <span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">You can install it from the Extensions view in VS Code or from </span></span><span class="TextRun Underlined SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">[https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh)</span></span><span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8">.</span></span><span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}"> </span>
    - <span class="TextRun SCXW81384774 BCX8" data-contrast="auto" lang="EN-CA" xml:lang="EN-CA"><span class="NormalTextRun SCXW81384774 BCX8"> Or can search in extensions by typing `Remote Development` in the Extensions view in VS Code.</span></span><span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">   
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-bvzhxrgr.png)  
        </span>
3. <span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">**\*\*SSH Client\*\*** installed on your local machine:</span>
    - <span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">**Windows\*\***: Install Git for Windows which comes with Git Bash. You can download it from <u>[https://gitforwindows.org](https://gitforwindows.org)</u>.</span>
    - <span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">**\*\*MacOS\*\***: SSH client is pre-installed.</span>
    - <span class="EOP SCXW81384774 BCX8" data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">**\*\*Linux\*\***: SSH client is pre-installed.</span>

##### Step-by-Step Guide

1. <span style="text-decoration: underline;">Install the Remote - SSH Extension in VS Code</span>
    - Open VS Code.
    - Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
    - Search for "Remote Development" and install the extensions by Microsoft (As given in previous section).
2. <span style="text-decoration: underline;">Add the SSH Host</span>
    - Open the Remote Explorer tab
    - In the Remote Explorer tab, click the `+` button next to `SSH Targets`.  
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-pfxreycl.png)
    - In the input dialog that appears, enter: `ssh <a href="mailto:uwinid@delta.cs.uwindsor.ca">uwinid@delta.cs.uwindsor.ca</a>`  
         *Replace `uwinid` with your actual username, then hit `Enter`.*
        - - - - *If you are connecting to a different server, replace the server in the example above with the current server name, which is delta.cs.uwindsor.ca ( it can be gamma.cs.uwindsor.ca ...)*
    - Choose whether to save the configuration in the `~/.ssh/config` file or just for this session.
3. <span style="text-decoration: underline;">Connect to the Server via VS Code</span>
    - In the Remote Explorer tab, under `SSH Targets`, you should now see `delta.cs.uwindsor.ca`.
    - Click on `delta.cs.uwindsor.ca` to connect.   
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-mi2orr7m.png)
    - A new VS Code window will open. When prompted, enter your password for the `delta.cs.uwindsor.ca` server.  
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-zaiap2nn.png)
4. Open a Remote Workspace 
    - Once connected, you can open a folder on the remote server by clicking on `Open Folder` in the Remote Explorer sidebar.   
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-htpitp3m.png)
    - Navigate to the desired directory on the server and open it.  
        ![](https://help.cs.uwindsor.ca/uploads/images/gallery/2024-07/embedded-image-2d4qehbv.png)
    - If prompted for your password again, enter it to proceed.

#####   
Tips and Troubleshooting

- If you face issues with the host not being live or timeout, make sure you are either on CS Network WiFi/Ethernet or connected via Global Protect VPN.
- If you encounter connection issues, check the SSH output log in VS Code by clicking on the `View` menu, then `Output`, and selecting `Remote - SSH` from the dropdown.
- Ensure that your user account on the `delta.cs.uwindsor.ca` server is set up to accept SSH connections.
- If you are having connection issues due to invalid credentials, try authenticating them by going to https://auth.cs.uwindsor.ca; this will sync your credentials across all the CS services.
- In case you do not want to enter the password every time you connect to SSH, follow the other guide that helps you to set Key based authentication for SSH.