using local LS_COLORS on remote server via ssh without modifying remote server
Solution 1:
Create a file, say "prefs.rc" with whatever initialisation you like.
$ scp prefs.rc vps2:/tmp/ && ssh vps2
# ssh banner
$ . /tmp/prefs.rc && rm /tmp/prefs.rc
I would probably add some checks to verify that the remote file is indeed mine to write, and does not contain some trojan. Better to err on the side of paranoia.
Alternatively, start the prefs.rc with the sequence
. /etc/profile
. ~/.bash_profile
exec LSCOLORS=...
Use scp
to transfer, and then:
ssh -t vps2 'exec bash --rcfile /tmp/prefs.rc'
Ultimately you may need to copy the entire contents of .bash_profile, and just replace the LS_COLORS=...
line.