Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Microsoft Visual Studio Code is not allowing a person to login to a remote computer, also known as a remote target after said remote computer has not been used for some time.

or

Microsoft Visual Studio Code is not allowing a person to login to a remote computer such a CSIL, but you are still able to login via ssh and terminal

Solution 5

This is actually multiple possible problems 1) saved credentials do not match current credentials or 2) saved computer does not match current computer or 3) unspecified other permissions issue, but since the VS error message can be the same as well as the solution, we are lumping them together. If its a type 3) situation, please see Solution 4 above.

"Host key verification failed" means that the host key of the remote host was changed. This happens after major changes such as when we reimage our computers every quarter.

VS code will stop you from connecting because it can also be a sign of spoofing, that the remote computer is not the one you think it is. So good security if you assume your remote computer never changes, which is a bad assumption in our case.

"invalid credentials" means that you changed your password and your current credentials do not match your saved credentials.

Once you clear credentials from the current instance, some extensions may prompt for authentication the next time you open VS Code. You can continue working in the current session.

"permission denied" can be either of the above as well as several other errors. e.g. your are using your ECE or UCSBnetID credentials on a CoE computer or vice versa. See Solution 4 above.

  • to clear ssh keys, also known as ssh targets, you can remove it on the SSH config file ~/.ssh/config where ~ is your home directory and exact path will vary person to person.
  • It is also a good idea to clear the ssh host key/target off ~/.ssh/known_hosts which is the file used by almost every other ssh program.
  • (Optional) Some extensions save credentials and need to be cleared as well.
    • On Windows: you can press windows key + r then type %USERPROFILE%\.%EXTENSION_NAME_HERE% where % indicates a variable and EXTENSION_NAME_HERE is your extension

    • On Linux and Mac OS: ~/.EXTENSION_NAME_HERE

    • For Ubuntu/GNOME Visual Studio Code users, the Credential Manager can be accessed by launching the "Passport and Keys" application. You can delete the Visual Studio Code/GitHub entry by clicking "Password", looking for the entry and delete

    • some extensions (no where near a complete list) are ~/.vscode-server for the default server, .sfdx for salesforce, .git or .github or .git-credentials for git/gitlab/github and assorted other repositories
    • In that directory you'll find a json file for each login saved, each one named after your username in that org. That json holds the following properties:

      • username
      • orgId
      • accessToken
      • refreshToken
      • instanceUrl
      • loginUrl
      • clientId

      You can delete the ones you don't need.

  • (Optional) Navigate to Code > Preferences > Settings > Workspace > Extensions > your_extension_name_here  to check whether the credentials and the instance URL have been deleted for all extensions

"over quota" means you have used up your quota, you allocation of space and files, and cannot write the files that VS code needs to write to in order to login. Solution is the same as Solution 4 above.


Code Block
languagebash
themeEmacs
to see your current quota: quota -s USERNAME

External Sources of information

...