2FA codes in any app: Terminal, VPN, Remote Desktop

Password managers and browsers fill in 2FA codes on websites. But many logins happen elsewhere: in a VPN client, on the command line, in a remote desktop or in company software.

Where AutoFill stops

Browser AutoFill recognizes login forms on websites. Outside the browser there is usually no form it understands:

That usually means picking up the phone, unlocking it, finding the app and typing six digits by hand – before the code runs out.

With a shortcut instead of the phone

Quick Authenticator works the same way in every app because it doesn’t depend on a form:

  1. Press ⌥⌘A – wherever you are. The list opens in the menu bar.
  2. Type a few letters of the service, for example vpn.
  3. Press Return. The code is on the clipboard.
  4. Paste it with ⌘V into the VPN client, the terminal or the remote desktop.

If the code is about to expire, the next one is already shown, so you don’t have to wait for the timer. The shortcut can be changed in the settings.

Clipboard and lock

For the command line

In the terminal, ⌥⌘A, a few letters, Return and ⌘V take a few seconds. In Shortcuts, the “Copy Code” action makes the same available to your own automations.

In short

← All articles