Customise iTerm sudo password prompt

I found the setting that turns this off, it's in advanced preferences. Not sure you can make it look like the normal terminal one, but this might help folks that want to get rid of the key entirely.

iTerm2 > Preferences > Advanced > Experimental Features > "Show key at cursor at password prompt" => No


Looking at the source code for iTerm2 it appears that this is a unicode character hard coded into the password prompt display code. At the time of writing, the relevant line the source code that displays this character is here.

To change the display character you would need to clone the github repository, modify the character on the aforementioned line and then compile iTerm2 from source. Not an impossible task if you're competent with Xcode. The project is well-organized and well-maintained so it's straight-forward to build it from source.