Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Connecting from a Windows 7 PC via SSH to an Ubuntu server using PuTTY, I get some screen errors:

enter image description here

I.e. it:

  • "Double-draws" the selection inside Midnight Commander (MC).
  • Other characters like line elements are drawn as the wrong characters (e.g. "â" instead of "|").

I connected to the same Ubuntu server with a terminal and SHH from a Mac OS X and do not get these screen garbling (i.e. everything looks and works correctly). I've already tried to play with the font settings inside PuTTY, changing it from Courier New to Consolas but without luck.

My question therefore is:

How to configure PuTTY to correctly display special characters and not double-draw/overwrite screen lines?

share|improve this question
up vote 38 down vote accepted

You almost certainly have set the wrong character set in your PuTTY settings.

Verify the character set on the remote system by running the command:


This should return something like:


So check your PuTTY settings under Translation and ensure that you have UTF-8 set as the character set.

PuTTY Reconfiguration

You may need to tweak the line drawing setting as well, but it is probably not likely.

share|improve this answer
That did the trick, thanks a lot, Michael! – Uwe Keim Feb 6 '13 at 7:39
This is not sufficient in all cases. You should also export the following variable to your environment: NCURSES_NO_UTF8_ACS=1 [more info] – Piotr Jurkiewicz Dec 14 '14 at 22:53
in case locale returns POSIX you probably have usePAM disabled in the sshd config – user2693017 Jul 20 '15 at 19:59
If the locale returns something like POSIX, issue update-locale LANG=en_US.utf8 at the command line - see – koppor Dec 19 '15 at 11:05

I had an issue with Debian's aptitude program even though I had UTF-8 as my characters set. What worked for me was to set the 'Connection > Data > 'Terminal-type string' to 'putty' instead of 'xterm' - apparently Putty ignores the character sequence to switch into drawing mode:

enter image description here

share|improve this answer
Excellent. Easy and it works. (At least it does on Debian/Ubuntu.) – Nate Apr 29 '15 at 22:46
This works well (on PuTTY) but then it introduces another (more minor) problem: remote-controlled window title changing no longer works. – ADTC Jun 19 at 8:24

Also, if UTF-8 is not properly configured, you may run it as mc -ac.


share|improve this answer

Another reason somehow related to pam that may affect hosts with powerbroker/pbis/likewise authentication.

grep /etc/pam.d for the "lsass" occurance:

grep -r lsass /etc/pam.d

if you see in the output something like:

/etc/pam.d/common-session:session       sufficient

then it's probably the root cause of the problem. The quick fix is to replace "sufficient" with "optional" next to pam_lsass module so it looks like:

/etc/pam.d/common-session:session       optional

/etc/pam.d/common-session (or other file with similar entry - there might be few of them) is probably included by /etc/pam.d/sshd before pam_env is loaded so if the processing of pam modules is finished before it comes to pam_env, the /etc/default/locale is not loaded in the user environment and you have garbled characters.

share|improve this answer

The two basic factors are Window/Translation UTF-8 in putty and locale settings in Linux, as instructed here and many other places.

In addition, it may help in putty to set Connection/Data/Terminal-type string to putty, and/or in Linux to export NCURSES_NO_UTF8_ACS=1. These two are also mentioned multiple places.

But: you may still get blocks for certain characters because the default fonts like Courier and Lucida Console don't have all Unicode chars. Download and install, and set putty to use it.

This last trick was necessary for me to get noping (recommended!) to show all graphic characters.

share|improve this answer

In my case (Ubuntu 14.04) the issue was caused by missing

UsePAM yes    

entry in /etc/ssh/sshd_config as /etc/pam.d/sshd pam configuration is responsible by default for loading /etc/default/locale into users environment.

share|improve this answer

Running mc this way (set locale to en) works for me:

$ LC_ALL=en mc
share|improve this answer

I was looking for many solutions for this when using Docker machine (both locale and on machines set up by system administrator). In my Putty everything was fine (I had UTF-8), I was using also other SSH client and had exact same problem.


mc -ac

was solving the problem (but not completely) and I was looking for complete solution.

After reading many suggestions, I finally found the one that solved my issue.

In terminal when you run:


verify what locale you have set. I had by default C locale.

To verify all locale installed run locale -a

I have for example:


by default.

The solution is exporting LANG variable with C.UTF-8 locale like so:

export LANG="C.UTF-8"

You can obviously add it into .bashrc to have it automatically set in your profile.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.