# Fixing that weird locale error when SSHing to a server

Published: 2017-01-18
Last updated: 2018-08-23

![SSH Error Screenshot](/images/2017/01/ssh-locale-error.png)

Each time I ssh to my server I'd keep seeing this error:

```
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

```

What's happening here?

According to [Greg Bacon](http://stackoverflow.com/a/2510548), the environment variables for the locale gets sent to the server. Since the server doesn't have the locale requested by my client, I end up seeing that error.

The fix is quite simple. Edit the `sshd.conf` file and don't ask it to pass locale information to the server.

```bash
sudo nano /etc/ssh/sshd_config

```

Find the line with:

```
# pass locale information
AcceptEnv LANG LC_*

```

And comment it off:

```
# pass locale information
# AcceptEnv LANG LC_*

```

