paste.bsd.computer provides web hosting with syntax highlighting for text files. Place files inside $HOME/pub/paste, and they will be publicly viewable at paste.bsd.computer/~user/file.

You can do this easily via e.g. scp or ssh:

$ scp file.txt user@bsd.computer:pub/paste/

$ cat file.txt | ssh user@bsd.computer "cat > pub/paste/file.txt"