It won't strip existing lines, but will prevent them from being recorded in the future.
HISTIGNORE=ssh*
Like many shell variables, this one is a colon-separated list.
Like many shell variables, this one is a colon-separated list.