Versions Compared

Key

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

...

Disable extensions one at a time to see if that extension is the one causing an issue

Problem 4

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.

Solution 4

"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.

Once you clear credentials from the current instance, the ServiceNow Extensions for Visual Studio Code extension prompts for authentication the next time you open VS Code. You can continue working in the current session.


Note 1: The password is not stored in the Visual Studio Code settings.
Note 2: The SSH Target (what other programs call ssh keys) are also in another file.


  • Navigate to View > Command Palette.
    You can also use a keyboard shortcut, Control+Shift+P on Windows or Command+Shift+P on MacOS to open the command palette.
  • Choose Now: Clear Credentials from the command palette.
    Now: Clear credentials commandClear Credentials commandImage Added
    The credentials of the current project are cleared.
  • (Optional) Navigate to Code > Preferences > Settings > Workspace > Extensions > ServiceNow to check whether the credentials and the instance URL have been deleted.
  • 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.


External Sources of information

...