This question's purpose is to document my findings and solution after two hours of struggle, in hopes that it will be useful to others in the future.
Situation
I've got a fresh Linux machine set up. When logged in to it locally, ls --color=auto
correctly displays directory entries in colours. However, when logged in to it remotely via SSH, ls --color=auto
does not seem to work.
Why is it so? How to get coloured ls
over SSH as well?
Other symptoms
The output of dircolors
mirrors the behaviour of ls --color=auto
. When running locally, dircolors
sets a contentful LS_COLORS
environment variable. However when running over SSH, dircolors
sets LS_COLORS=''
instead.