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!

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

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!