2 added my fix
source | link

You couldDue to execute this from your command linethe fact that "etc/motd" is a plain text file, commands are not executed, but instead printed as so:

#!/bin/bash
echo "$(tput setaf 2)
   .~~.   .~~.
  '. \ ' ' / .'$(tput setaf 1)
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) $(tput sgr0)Raspberry Pi$(tput setaf 1)
   '~ .~~~. ~'
       '~'
$(tput sgr0)"

Instead, create a new file called "motd.sh" inside "/etc" and input the MOTD there instead. This is now an executable script, but is not executed. So goto "/etc/profile" and add at the end of the file:

bash /etc/motd.sh

This will now execute the script upon connection and display colour.

 > /etc .~~.   .~~.
  '. \ ' ' /motd .'
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) Raspberry Pi
   '~ .~~~. ~'
       '~'

You could to execute this from your command line:

echo "$(tput setaf 2)
   .~~.   .~~.
  '. \ ' ' / .'$(tput setaf 1)
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) $(tput sgr0)Raspberry Pi$(tput setaf 1)
   '~ .~~~. ~'
       '~'
$(tput sgr0)" > /etc/motd

Due to the fact that "etc/motd" is a plain text file, commands are not executed, but instead printed as so:

#!/bin/bash
echo "$(tput setaf 2)
   .~~.   .~~.
  '. \ ' ' / .'$(tput setaf 1)
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) $(tput sgr0)Raspberry Pi$(tput setaf 1)
   '~ .~~~. ~'
       '~'
$(tput sgr0)"

Instead, create a new file called "motd.sh" inside "/etc" and input the MOTD there instead. This is now an executable script, but is not executed. So goto "/etc/profile" and add at the end of the file:

bash /etc/motd.sh

This will now execute the script upon connection and display colour.

   .~~.   .~~.
  '. \ ' ' / .'
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) Raspberry Pi
   '~ .~~~. ~'
       '~'
1
source | link

You could to execute this from your command line:

echo "$(tput setaf 2)
   .~~.   .~~.
  '. \ ' ' / .'$(tput setaf 1)
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) $(tput sgr0)Raspberry Pi$(tput setaf 1)
   '~ .~~~. ~'
       '~'
$(tput sgr0)" > /etc/motd