The default settings for [VS code's](https://code.visualstudio.com/) *wonderful* extension — [Remote - SSH](https://code.visualstudio.com/docs/remote/ssh-tutorial) — make connecting to a server that requires two-factor authentication (2FA) a bit of a hassle.[^1] You can easily solve this problem by following the below steps: - Go to the VS code settings - Enable the following setting: ****remote.SSH.showLoginTerminal**** Now, when trying to connect to the 2FA'd server, VS code will deliver the terminal prompt and you should be able to follow 2FA instructions as you normally do. Interestingly, (at least in my case) trying follow these steps without this enabled did not work. --- #### Related #programming [^1]: See [this question](https://stackoverflow.com/questions/69277631/2fa-with-vs-code-remote-ssh) for a description of the problem.