How to fix SSH UTF-8 issues in Mac OS X Lion

After upgrading from Snow Leopard to Lion, ssh connections to remote servers using iTerm2 have issues with non ascii characters.

Luckily that’s easy to fix. Simply comment SendEnv LANG LC_* in /etc/ssh_config out.

1
2
3
4
5
Host *
 # SendEnv LANG LC_*
 # ForwardAgent no
 # ForwardX11 no
 ...

No other changes are needed. You could also permanently change your locale to UTF-8. Just place export LANG=en_US.UTF-8 in your shell’s source file.