In the terminal app you are using to ssh, go to preferences -> advanced -> Declare terminal as: -> xterm-color (or something besides xterm-256color)
This answer was taken from a comment to this post, which has another solution:
http://marcoschuh.de/wp/?p=873