Yes, I do use a password manager. Yes, I do use complicated long passwords, a la XKCD.

However, sometimes I fail repeatedly when entering the master password to my password manager. Which has no "show" button, presumably due to security concerns about cameras.

Cameras that are just not there - I don't this in public.

So what I instead do after 3 or 4 bad attempts is:

  • type in password in terminal app (macos if you must know)
  • don't enter it
  • copy it to the clipboard
  • paste it into the password manager (local one, not online)
  • if if fails, go and correct the capitalization - is it HorseBattery or horseBattery? again don't enter it.
  • once successful, erase terminal characters

As I can think of it, I am at risk of keyboard sniffers (but no more so than just by entering in the password manager apps. I am also at risk of cameras, but don't consider that a realistic threat. It's not in the command history as I never entered it. Yes, something capturing clipboards is a problem, but by the time my system allows that, I am done for already.

Am I missing something? Writing this up I can think of 2 extra steps:

  • copy something to clipboard right after, to replace password in it
  • minimize open browser windows, just in case there is JS clipboard exploit running, somehow

Is there a better way to deal with typos on really complicated passwords?

2 Answers 2


Also, if you accidentally press enter in the terminal

To mitigate the risk of this, type a command like

cat > /dev/null

then type your password. Either ^C or ^D (Control characters) will cause cat to exit (but ^D will only work at the beginning of a fresh line).

If you do accidentally press Enter it does not go into command history or readline. But you'll still have to close the terminal window to be able to get rid of it from your screen and/or scrollback history.

Another approach I sometimes employ is to use a simple editor (gedit or similar, on Linux), but more often, I do that when I'm already in Keepass (my password manager), and I want to use gedit to test the auto-type sequence. The precaution here is to close the editor (or the tab within the editor) immediately when finished (as opposed to wiping out the characters, which can be restored with undo).

  • Of course, these approaches are still susceptible to screenshots and the other hazards of screen visibility.
    – Kiwi Nick
    Commented Oct 2, 2023 at 12:47
  • Or only use cat, no need to redirect the output...
    – ThoriumBR
    Commented Oct 3, 2023 at 13:30

Am I missing something?

The main issue with typing out a password that can be viewed in the clear is that of screen visibility – that is, something around you, or something running on the device itself, which may be able to view / record the contents of the screen. This along with keyloggers (which could also count as any untrusted program you directly type your passphrase into) would amount to a total passphrase compromise. At which point you'd just have to hope those things, and any records they may create, aren't going to be used in a malicious way.

The two extra steps you thought of are good ones. You may also consider getting a dedicated clipboard wiping program, since the clipboard may be saved as a history of copied items, not just the most recent item – such programs as bleachbit or xsel.

Also, if you accidentally press enter in the terminal, then the passphrase may be viewable by everything on the system. Then you'll likely have to wipe the logs and pray again.

Is there a better way to deal with typos on really complicated passwords?

The XKCD you mention used "correct horse battery staple" as an example passphrase. In the example, you'll notice that there aren't any capitalized letters. Your case actually illustrates the rationale for the argument made in that popular comic: clever randomization tricks can easily be forgotten or mistyped and the nominal security increase they provide don't make up for the human hassle they cause. Eschew the complications and add more simple words that you can easily remember (but that someone other than you can't easily guess, even given many of your personal details / traits / interests).

Practice typing in general. Improving your typing skills and comfort may reduce the likelihood of typos.

  • Yes, you most definitely are missing the part where I stated cameras were not a realistic risk. And I don't need to be told how to practice my typing skills, thank you very much. Nor warned about "capitalization gimmicks", not when many passwords require mixed case. I usually horseBattery - a standard programming casing variant - dromedaryCase, except that one of my passwords has HorseBattery. Commented Oct 1, 2023 at 17:09
  • You mentioned that the password you're mistyping is the master password to unlock your password manager. It seems like you could forgo the confusing capitalization for just this one password without reducing your risk in a significant way.
    – jrw32982
    Commented Oct 2, 2023 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .