8.7 Entering passwords
Sometimes, you may need to enter a password into Emacs. For instance, when you tell Emacs to visit a file on another machine via a network protocol such as FTP, you often need to supply a password to gain access to the machine (see Remote Files).
Entering a password is similar to using a minibuffer. Emacs displays a prompt in the echo area (such as ‘Password:
’); after you type the required password, press RET
to submit it. To prevent others from seeing your password, every character you type is displayed as an asterisk (‘*
’) instead of its usual form.
Most of the features and commands associated with the minibuffer cannot be used when entering a password. There is no history or completion, and you cannot change windows or perform any other action with Emacs until you have submitted the password.
While you are typing the password, you may press DEL
to delete backwards, removing the last character entered. C-u
deletes everything you have typed so far. C-g
quits the password prompt (see Quitting). C-y
inserts the current kill into the password (see Killing). You may type either RET
or ESC
to submit the password. Any other self-inserting character key inserts the associated character into the password, and all other input is ignored.