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:
- VPN clients such as Cisco Secure Client, GlobalProtect or OpenVPN ask for a one-time code in their own window.
- SSH and the command line: servers with two-factor authentication ask for a “verification code” in the terminal.
- Remote Desktop and Citrix sessions often require a code before the connection starts.
- Company software and admin tools have their own login dialogs.
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:
- Press ⌥⌘A – wherever you are. The list opens in the menu bar.
- Type a few letters of the service, for example
vpn. - Press Return. The code is on the clipboard.
- 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
- Clipboard: the copied code can be cleared from the clipboard after 30 seconds, but only if it’s still there – anything you copied afterwards stays.
- Locked with Touch ID: the codes stay hidden until you unlock and lock again automatically after a pause or when the Mac sleeps.
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
- Outside the browser, AutoFill can’t help – a global shortcut can.
- ⌥⌘A, type, Return, ⌘V works in the VPN client, the terminal and the remote desktop alike.
- The codes stay on your Mac, locked with Touch ID.
