WebFaction
Community site: login faq

When I log into my server via SSH, I receive the following error:

> ssh user@domain.com
Last login: Tue Jan 10 13:06:02 2017 from 91.118.23.66
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

There seems to be something wrong with the locale settings. When I execute the "locale" command, I see similar errors:

> locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I'm logging in via macOS, if that makes any difference, to "web523.webfaction.com". Thanks a lot in advance for any help!

asked 10 Jan, 13:11

PrimaryFeather's gravatar image

PrimaryFeather
112
accept rate: 0%

edited 10 Jan, 21:38

I can't seem to reproduce this issue, from a clean MacOS 10.12 install with default terminal settings.

Try a SSH session from a guest account (or clean user account) on your Mac, and if that works, then compare the terminal environment on that account with your main user account, then investigate anything that seems different and relevant.

If you spot the problem, feel free to post the solution as the answer :)

(10 Jan, 20:04) seanf ♦♦ seanf's gravatar image

You are right, it definitely seems to have to do something with my macOS installation. Accessing the server from a guest account didn't help, but logging in from another Mac and a Linux machine works without any errors. I'll see if I can get to the root of this, and will post the solution / any workarounds I find.

Thanks a lot for looking into it, in any case! I should have known it's not Webfaction's fault. ;-)

(11 Jan, 11:12) PrimaryFeather PrimaryFeather's gravatar image

Finally, I found the solution for this problem: it's described in detail here.

In a nutshell, my LC_CTYPE environment variable is set to "UTF-8", which is not supported on the server I'm connecting to. By default, SSH tries to recreate those environment variables (LC_*) on the server, which fill fail in this case (this is the error I am seeing).

The workaround is to uncheck "Set locale environment variables on startup" in the macOS terminal profile you are using (via "Terminal - Preferences - [any profile] - Advanced").

Why this is necessary on one of my macs, but not on the other — that's another question, but I'll leave it at that. ;-)

permanent link

answered 14 Jan, 16:07

PrimaryFeather's gravatar image

PrimaryFeather
112
accept rate: 0%

edited 20 Jan, 08:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×97
×5

question asked: 10 Jan, 13:11

question was seen: 458 times

last updated: 20 Jan, 08:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED - WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM