Troubleshooting PuTTY

Directory/filenames which contain non-English/Asian characters show up as ?????? or are corrupt

If you have problems with your filenames or content not showing up correctly then you should add the following to your .bash_profile file to enable UTF support:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export G_FILENAME_ENCODING=UTF-8

UTF-8 is most likely enabled already. You can check in your terminal by entering the command ‘locale’:

[server]$ locale
LANG=en_US.UTF-8
LANGUAGE= 
LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8" LC_COLLATE=C 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=

You can see the first line is LANG=en_US.UTF-8. If for some reason this still doesn’t work, it’s most likely the terminal client you’re using. In PuTTY you can manually adjust the translation option to UTF-8.

To adjust the translation option, follow these steps:

  1. Open the PuTTY general configuration.
    06 charset trans.fw.png
  2. In the left Category list section, select ‘Window > Translation’.
  3. In the dropdown for ‘Remote character set:’ choose UTF-8.
  4. Go back to the ‘Session’ category and make sure to save your current session with all settings.

When you log in again using PuTTY, the non-English characters display correctly.

Idle connections are dropping

DreamHost and other ISPs may kill ssh connections that remain idle longer than a certain number of minutes. In PuTTY (for Windows), you are able to adjust that setting in the Configuration box:

  1. Open the PuTTY general configuration.
  2. In the left Category list section, select ‘Connection’.
  3. In the field ‘Seconds between keepalives (0 to turn off)', enter 15.
  4. Check the box for ‘Enable TCP keepalives (SO_KEEPALIVE option)'.
    07 connection.fw.png

The SSH client asks the server for a sign of life every 15 seconds, thus keeping the connection open.

Connection issues

You may see the following error when connecting:

No supported authentication methods available (server sent public key)

This could be an issue with how the public key was saved. PuttyGen will create a public key file that looks like this:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20121022"
AAAAB3NzaC1yc2CAAAABJQAAAIEAhGF6GIuMY8FJ1+CNApnSY1N2YSlkYz72Yvwu
a6N1nFpBklz1+dsIMg4rcTLcF34M/tW5Yz+NUDAw2AEbxQ32FPgw7sAOIXktkYOH
tr7mmimiTjkoSCrJh1kqalPSpi8rglT/Bp67Ql2SZwvUFfMzHISryR0EZC4rXP/u
vObrJe8=
---- END SSH2 PUBLIC KEY ----

The key needs to be saved on a single line. Open the key in PuttyGen and copy it from there and paste it into a program like notepad. This results in the key saved on 1 line:

ssh-rsa AAAAB3NzaC1yc2CAAAABJQAAAIEAhGF6GIuMY8FJ1+CNApnSY1N2YSlkYz72Yvwua6N1nFpBklz1+dsIMg4rcTLcF34M/tW5Yz+NUDAw2AEbxQ32FPgw7sAOIXktkYOHtr7mmimiTjkoSCrJh1kqalPSpi8rglT/Bp67Ql2SZwvUFfMzHISryR0EZC4rXP/uvObrJe8= rsa-key-20121022

Paste this from notepad into the authorized_keys file on your server and it should work. View the following page for a more detailed explanation:

See also

Did this article answer your questions?

Article last updated .