Mac Terminal app - unable to use the up arrow to load previous commands when using SSH on remote server ( ^[[A )
Please try to temporarily change your shell, type the name of the shell:

$ /bin/csh 


See if that fixes your arrow key. If so, your shell or shell profile is having the cause of the problem.

Possible solutions:


Fix your current shell or shell profile.
You can change to a different shell permanently.


Reference: Mac OS X: How to change the Terminal shell