HISTIGNORE=ssh
It won't strip existing lines, but will prevent them from being recorded in the future.
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.