Using terminal ssh to my Linux servers I have always got the following error:
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
Commenting the following line from /etc/ssh_config file on my Mac was the solution for me:
# SendEnv LANG LC_*
Note: do not forget to use sudo when editing with in terminal like:
$sudo nano /etc/ssh_config