PuTTY is a free terminal emulator which supports various network protocols such as SSH, Telnet, rlogin, and SCP. It was originally available only for Windows, but is now also available on various UNIX platforms, with work-in-progress ports to Classic Mac OS and Mac OS X. At DreamHost, you are able to use PuTTY to log into your web server through your SHELL username.
Main functions are realized by PuTTY files themselves. These can be downloaded at the following site:
- PuTTY (putty.exe)
- the Telnet and SSH client itself.
- PSCP (pscp.exe)
- an SCP client (i.e., command-line secure file copy).
- PSFTP (psftp.exe)
- an SFTP client (i.e., general file transfer sessions much like FTP).
- PuTTYtel (puttytel.exe)
- a Telnet-only client.
- Plink (plink.exe)
- a command-line interface for the PuTTY back ends.
- Pageant (pageant.exe)
- an SSH authentication agent for PuTTY, PSCP, and Plink. It holds your private keys in memory, already decoded, so that you can use them often without needing to type a passphrase.
- PuTTYgen (puttygen.exe)
- an RSA and DSA key-generation utility.
Use the following steps to download and set up PuTTY onto your Windows computer.
- On your Windows computer:
- navigate to C:\
- In that directory, create a folder named \bin
- Open the download page in your browser:
- Download the following files from that site into your C:\bin folder:
- For easy access, create a shortcut on your Desktop:
- Right click on your Desktop and choose ‘New > Shortcut’
- Browse to the location of your putty.exe file (it should be C:\Users\yourusername\bin\putty.exe)
- Save the shortcut
- The following configuration box appears when you open PuTTY:
- Enter your DreamHost credentials in the PuTTY Configuration box (see details below).
- Click the Save button to save this session.
When you open a session in PuTTY, you are prompted for your SHELL username/password.
Description of fields in the PuTTY configuation box
- Host Name (or IP address)
- In this field enter your DreamHost servername. For example, if your server is named flower, this hostname is flower.dreamhost.com
- Connection Type
- Saved Sessions
- Enter a name for this connection. For example “DreamHost Server”
Setting up passwordless login
The following are instructions on how to set up passwordless login with PuTTY.
- Open the puttygen.exe file you downloaded previously. You’ll use this to create your private/public keypair.
- In the PuTTY Key Generator box, make sure the radio button at the bottom is selected for ‘SSH-2-RSA’.
- Click the Generate button.
- Move your mouse around the box to help generate the keys.
- Once the key is created, a new pop-up box appears:
- Upload the public key you just created to your DreamHost users home directory. You can use a client such as Filezilla to do this.
- Log into your DreamHost web server through PuTTY.
- In your users /home directory, create an /.ssh directory by running this command:
- Append the public key you just uploaded to a new file named ‘authorized_keys’ which is located in the /.ssh directory by running this command in your users /home directory:
ssh-keygen -i -f dreamhostpublickey >> ~/.ssh/authorized_keys
This appends the dreamhostpublickey you uploaded from your home computer into a new file named ‘authorized_keys’. Just make sure the name of the public key file is the name you uploaded it as.
- Adjust permissions by running this command:
chmod go-rwx ~/.ssh ~/.ssh/authorized_keys
Then remove the original dreamhostkey.pub file:
Now the keys sit on the server (protected from access by others)
- Log out of PuTTY and start the program up again.
- When the program restarts, open the configuration box and click the ‘Connection’ > ‘Data’ category on the left.
- Enter your DreamHost SHELL username in the first field which is named ‘Auto-login’ username.
- In the same configuration box, click ‘Connection’ > ‘SSH’ > ‘Auth’.
- Click the Browse button and navigate to the location on your computer where you saved your dreamhostprivatekey file.
- On the configuration box, click the 'Session' category and enter the following:
- Host Name: yourserver.dreamhost.com
- Port: 22
- Connection Type: SSH
- Saved Session: Enter a new name
- Click the Save button.
- Open pageant.exe on your home computer to authenticate automatically.
- It may appear as an icon on the bottom right of your toolbar.
- Right click on that icon and choose ‘Add Key’.
- Navigate to where you stored your private key on your computer and add the private key file.
- Open PuTTY and click the new saved session you created for the passwordless login. You are logged in without a password prompt.
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’.
[horsetail]$ 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:
- Open the PuTTY general configuration.
- In the left Category list section, select ‘Window > Translation’.
- In the dropdown for ‘Remote character set:’ choose UTF-8.
- 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:
- Open the PuTTY general configuration.
- In the left Category list section, select ‘Connection’.
- In the field ‘Seconds between keepalives (0 to turn off)', enter 15.
- Check the box for ‘Enable TCP keepalives (SO_KEEPALIVE option)'.
The SSH client asks the server for a sign of life every 15 seconds, thus keeping the connection open.