I have an MOTD script installed in /etc/update-motd.d that works properly, however it seems that SSH bleeds out the colour.
SSHD Look:
Output when running the script once logged in:
Actual script:
cat /etc/update-motd.d/20-logo
#! /usr/bin/env bash
echo "";
echo "$(tput setaf 2) .::::::::::::::::::::::::::::::::::::::::...
:::::::::::::::::::::::::::::::::::::::::::::::::::.
.::::::::::::::::::::::::::::::::::::::::::::::::::::::.
.....::::::::::::::::::
$(tput setaf 7):@@@@@O $(tput setaf 2).:::::::::::
$(tput setaf 7)@@@@@@@o $(tput setaf 2).::::::::
$(tput setaf 7)@@@@@@@o $(tput setaf 2):::::::
$(tput setaf 7)@@@@@@@o $(tput setaf 2).::::::
$(tput setaf 7):@@@@@O @@@@@@@o O@@@@O $(tput setaf 2):::::::
$(tput setaf 7):@@@@@@@@o @@@@@@@o o@@@@@@@O $(tput setaf 2):::::::.
$(tput setaf 7)o@@@@@@@@O @@@@@@@o :@@@@@@@@@ $(tput setaf 2).::::::::.
$(tput setaf 7)o@@@@@@@O @@@@@@@o o@@@@@@@O $(tput setaf 2)..:::::::::::::
$(tput setaf 7)@@@@@@@O @@@@@@@o :@@@@@@@o $(tput setaf 2)::::::::::::::::::
$(tput setaf 7)o@@@@@@@ @@@@@@@: o@@@@@@@ $(tput setaf 2)::::::::::::::::.
$(tput setaf 7)o@@@@@@o o@@@O: @@@@@@@ $(tput setaf 2).:::::::::..
$(tput setaf 7)o@@@@@@@ o@@@@@@@ $(tput setaf 2).:::::::::
$(tput setaf 7)o@@@@@@@ O@@@@@@O $(tput setaf 2).:::::::::.
$(tput setaf 7)@@@@@@@@ O@@@@@@@: $(tput setaf 2).::::::::::.
$(tput setaf 7)@@@@@@@@O :@@@@@@@@o $(tput setaf 2).:::::::::::.
$(tput setaf 7)@@@@@@@@@O: o@@@@@@@@@o $(tput setaf 2)::::::::::::::.
$(tput setaf 7)O@@@@@@@@@@@@@@@@@@@@@@@@@@@@: $(tput setaf 2).:::::::::::::::..
$(tput setaf 7)O@@@@@@@@@@@@@@@@@@@@@@@@: $(tput setaf 2).:::::::::::::::.
$(tput setaf 7):@@@@@@@@@@@@@@@@@@@O $(tput setaf 2).::::::::::::
$(tput setaf 7)oO@@@@@@@@@@o: $(tput setaf 2)..::::.$(tput sgr0)
";
echo "================================================================================";
I've ensured that force_color_prompt=yes
is enabled in ~/.bashrc
and that my $TERM
variable looks right on both sides. Both terminal-emulator and server show xterm-256color
What could be causing the colour to fail on SSH login?