The problem does not occur on your end, but on the remote end. The remote end has a set of dircolors
which is used by your login shell. The ANSI color escape sequences are transmitted through ssh to your terminal emulator, which displays them as it should. So there are a few ways to remedy the situation, each occurring at a different point along the pathway:
- The most elegant way is to change your dircolors settings on the remote machine. If you make them match your own dircolors settings, it would look the best.
- A different solution is to disable dircolors altogether from within bash (or whatever shellís builtin ls is being used).
- A hacky solution is to tell the local terminal emulator (e.g., xterm) to display the requested color differently. This means the information for dark blue text will still be sent over ssh, itís just interpreted differently by your terminal emulator.
The specific details for these depends on (respectively) the remote machineís distro/setup, the remote shell in use, and the local terminal emulator in use. If you need more help, just provide the information corresponding to the solution you would like to chose (I would recommend the first).