Files with Japanese names that show up fine when I'm in the local terminal, all turn into ???? when I ssh in from my laptop. It's because the locale of the remote sessions is ignoring the default locale and encoding of my local terminal. My local terminal defaults to "en_US.UTF-8," while the ssh sessions are something called "C," which apparently doesn't support Unicode.

One solution I've discovered is to to edit the ssh_config and sshd_config files so that the client sends the language environment variables, and the server accepts them. I've created two commands you can run in Terminal to achieve this:On the server, you should run:
sudo sh -c 'printf "\n\n# Accept language environment variables\nAcceptEnv LANG LC_*" >> /etc/sshd_config'
and on the client...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon


[Read more...]