BASH autocomplete for SSH
b.sricola.com
b.sricola.com
Or give zsh a try, simply autoload compinit and it will do ssh/sftp auto completions along with a boatload more out of the box.
HashKnownHosts noIt absolutely mystifies me when people get all excited about trivial enhancements to Bash, when Zsh has had those features for a decade.
It won't strip existing lines, but will prevent them from being recorded in the future.
HISTIGNORE=ssh*
(the pattern has to match the entire line.)Like many shell variables, this one is a colon-separated list.
The .ssh/config tip does work though. I'd rather have them there anyway since I can give the host an alias.
Host myproxy
HostName xxxxxxx.xxx
User xxxx
Port xxxx
and ssh will autocomplete on my<Tab>Then someone told me about `apropos` which is summarized in it's man page as "search the whatis database for strings". Sooo useful. Not nearly as useful as simply reading man pages from start to finish, but I've only got so much spare time.
"\e[A": history-search-backward
"\e[B": history-search-forward
OP's method would be helpful when the line differs syntactically prior to the hostname e.g. different options, arguments, a pipe into it. Though that case is rare in my own usage.ctrl-s goes back down again, but not working for me, apparently because my gnome terminal intercepts it before bash's readline sees it, using it for xon/xoff according to http://stackoverflow.com/questions/791765/unable-to-forward-... This "fixes" it (by disabling the STOP feature of the terminal), so ctrl-s works to search down.
stty -ixon