Trouble Logging In Using VS Code With Remote SSH Plugin

First Things First...

If you are trying to log in to our CS Linux systems and are having issues doing so and are using Visual Studio Code with the Remote SSH Plugin, then, before any further troubleshooting is done, please make sure you can first log in into one of our available Linux systems only with SSH (i.e., without the use of VS Code.) If you are unable to log in with just ssh, and you are sure you are using the correct password, please contact support@cs.jhu.edu with as much detail as you can, including a screenshot of your login attempt, if you are able to.

If ssh'ing Into your Linux Account Works, But, Logging In with VS Code Does Not...

You might need to change the remote.SSH.useFlock setting. We've seen problems in the past that may have been related to VS Code's file locking mechanisms.

To enable flock, you will need to do the following:

  1. Exit all of your VS Code sessions (close all your VS Code windows)
  2. Delete the .vscode-server directory in your grad or ugrad home directory. You can do that by SSHing to the Linux client you used with VS Code and running:
    rm -fr ~/.vscode-server
    If the directory doesn't exist, that's okay.
  3. In VS Code, go to your settings, find the Remote SSH section, and uncheck Use Flock.
  4. Try connecting to the CS Grad or Ugrad system again.

If you receive the error: device or resource is busy

If you try to use rm -fr ~/.vscode-server (see above) and receive an error that it cannot be removed because the device or resource is busy, what should you do?

That device or resource is busy error message is usually because VS Code is still running somewhere. Make sure you have exited VS Code completely before running the command.

If you're absolutely sure VS Code is not running, it's possible it left behind some processes on whichever one of our client systems you were connecting to. In that case, you can try running the following command on our Linux client to stop any running processes:

pkill -u $(id -u) -f vscode

Note that this only helps if you run it on the same computer where the processes are running. If, for example, you connected to ugrad4 with VS Code but then ran the command on ugrad7, the processes would still be running on ugrad4.

Still having issues?

If you're still having issues, please email support@cs.jhu.edu with as much detail as you can. Please include the system you're connecting from, the system you're trying to connect to, and please make sure you can ssh into that system normally first before trying it with VS Code.