 <p>Setting HISTFILE=/dev/null is disabled in development version of Tramp, because there is a bug in bash which corrupts /dev/null then. Likely, the security department of your company is concerned about this.</p> <p>If you have a recent Tramp (say the one bundled with Emacs 24.5), setting HISTFILE=/dev/null is hardwired in tramp-sh.el. You would need to patch it there.</p> <p>If you install a newer Tramp version like 2.2.12 (see the Tramp manual how to do this), you could use the variable <code>tramp-histfile-override</code> to set your own value. Per default it is set to ".tramp_history", but there are also other possibilities. See the docstring of that variable.</p>