brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Secure Keyboard Entry stops other apps from reading what you type in Terminal

Terminal
~/tips/tip-terminal-secure-keyboard-entry

Terminal (menu bar) > Secure Keyboard Entry

Protects passwords and keys you type in Terminal from keyloggers and snooping apps.

You type passwords for sudo, ssh and databases into Terminal all day. One menu item makes it much harder for other software on the Mac to listen in.

Open the Terminal menu and choose Secure Keyboard Entry. A checkmark means it is on, and it stays on for every Terminal window, also after a restart.

Terminal (menu bar) > Secure Keyboard Entry

Apple describes it as preventing other apps on your computer or the network from detecting and recording what you type in Terminal. iTerm2 has the same setting in its own app menu.

I’d leave it on all the time. The cost is small, and it covers the moments you forget, like pasting a token or typing a database password by hand.

It does have side effects. Apps that rely on watching keystrokes can stop working while Terminal is in front, such as text expanders and some launchers. That is exactly what Apple warns about before you enable it. And it guards typing only. It does nothing about what appears on screen, what lands in your shell history or what is in the scrollback, so it is one layer, not the whole answer.

Further reading: Use secure keyboard entry in Terminal on Mac (Apple Support)

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link