Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Clear password entry field in the shell UNIX
This is just a quick tip for those of you (like me) who constantly mis-type their password when telneting, and don't like to wait for the 'username: ' prompt to come back around. When you realize that you mistyped it, just hit Control-U, and it clears out the buffer! This works for telnet, ssh, and ftp, and it works on most UNIX systems.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,777 views]  

Clear password entry field in the shell | 3 comments | Create New Account
Click here to return to the 'Clear password entry field in the shell' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
works most places...
Authored by: sharumpe on Oct 17, '02 11:14:19AM

^U is (by default) the 'kill' command, which will wipe everything on the current line. To see what other key commands exist by default, type:
stty -e

(not all will work in every shell, though)

Mr. Sharumpe



[ Reply to This | # ]
Just use backspace
Authored by: chabig on Oct 17, '02 12:22:10PM

Why not just backspace and retype the password?

Chris



[ Reply to This | # ]
Just use backspace
Authored by: fizzboy on Oct 17, '02 12:46:42PM

because sometimes the backspace key sends the wrong control character and instead of erasing what you just typed, it actually adds more characters to your password. Ctrl-U is the only reliable way I've ever found to erase your password in telnet, ftp, etc.

Oh, and don't use telnet or ftp. Use SSH. :)



[ Reply to This | # ]