Connect Securely to Tux from VSCode (All Platforms)

By default, VSCode uses a TCP port to talk to the VSCode server on remote hosts.  

This is insecure on multi-user systems like Tux, as any user can connect to your TCP port, and there is no security applied on this port.  

Thus, you MUST configure VSCode to use Sockets to talk to Tux, as this uses socket-based communication which is more secure on multi-user systems.

1. Open Settings from the Gear icon at the bottom left of the VSCode Window:

VSCode-Settings


2. Find Extensions and expand it, then find Remote - SSH and select it.

VSCode-Extensions-RemoteSSH


3. Scroll down to "Remote.SSH: Remote Server Listen On Socket" and enable this. 

VSCode-RemoteSSH-Socket


ECONNRESET Troubleshooting

  1. Make sure you have a backup of any code files or folders in OneDrive or another location.
  2. Be sure vscode is COMPLETELY shut down on your computer.
    Click the ^ near to date/time in Windows lower right, and right-click to quit.
    Do the same for any vscode icons in your bottom Taskbard or Dock in Mac or Windows.

  3. Then...ssh into Tux in a cmd.exe or Powershell or Mac Terminal window.
  4. Replace userid with your Drexel userid.
    ssh userid@drexel.edu
  5. Then type in the following commands. Press the Enter/Return key at the end of each line.
    cd ~
    ls -a
    rm -rf .vscode-server
  6. BE *VERY* careful to enter the last command above exactly as shown. 
  7. Then do what is in either the Windows or Mac section below.

NOTE: Your host names you connect to, extensions, and other local settings should be saved still, at least in our testing.
But it's possible that you may have to set up again.
Your other remote settings will likely be deleted, but that is necessary to fix this.
============================================================

On Windows:

  1. Then go to Start menu (Win key) and Settings > Applications & uninstall vscode.
    vscode is Visual Studio code OR Microsoft Visual Studio code.
  2. Open Run dialog window (Win key + R)
  3. Type in this into the box:
    %appdata%
  4. Press Enter/Return key
  5. Delete the folder called "Code"
  6. Download & reinstall vscode again.
  7. FOLLOW the SOCKET CONNECTION SECTION AT THE TOP OF THIS PAGE!

If that fails: 

  1.  Uninstall the VS Code application through your operating system's control panel or settings (e.g., "Add or Remove Programs")
  2. Open an Windows Explorer or File Explorer window.  
  3. Find View options and choose to show all hidden files and/or folders.
  4. Go to Start menu or Windows menu, click All Apps or Al Programs, go down to V section and M sections, see if any Visual Studio or Visual Studio related or Microsoft Visual Studio or Microsoft Visual Studio related programs are there, and uninstall them completely.
  5. Try right-click, and uninstall or click the > next to them and see if there's a working Uninstall option.
  6. You may need to Google where each is. and manually delete any Visual Studio or VS or Code folders.
  7. Open File Explorer and navigate to C:\Users\<YourUsername>\AppData\Roaming. 
  8. Delete the Code folder to remove VS Code user settings and extensions. 
  9. Navigate to C:\Users\<YourUsername>\AppData\Local. 
  10. Delete the Programs\Microsoft VS Code folder to remove the VS Code executable. 
  11. Navigate to C:\Users\<YourUsername>\.ssh and just delete that entire .ssh folder completely.
  12. Navigate to C:\Program Files (x86)\Microsoft Visual Studio\ and delete that entire Microsoft Visual Studio completely.
  13. Do the same with...   C:\Program Files (x86)\Microsoft Visual Studio   C:\Program Files\Microsoft Visual Studio %programdata%\\Microsoft\\visualstudio\\packages
  14. For above... Press Win + R.  Type %ProgramData% and press Enter. This will directly open the folder. Then delete Microsoft\visualstudio\packages .
  15. Open up regedit.
  16. Backup regedit (Google it)
  17. Then CAREFULLY find and delete 

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\VisualStudio and anything that says VisualStudio
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio and anything that says VisualStudio
  • HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio and anything that says VisualStudio

    18. Find and delete: C:\Users\username\AppData\Local\Microsoft\VisualStudio

     19. Press Win + R.  Type %temp% get rid of anything VS Code, Code, or Visual Studio related

============================================================

On Mac:

  1. Go to a Finder (split blue color face icon in dock) window.
  2. Right click & move vscode to trash (uninstall).
    This is Visual Studio code OR Microsoft Visual Studio code.
  3. Open back to Finder, click Go > Go to Folder, and copy paste in the following, then press Enter/Return.
    ~/Library/Application Support/
  4. Find & delete the folder called "Code."
  5. Download and reinstall vscode again.
  6. FOLLOW the SOCKET CONNECTION SECTION AT THE TOP OF THIS PAGE!