PuTTY is a great program. I think it tops the cake for most-useful-utility-on-windows that I have ever encountered. I’ve used it to connect to telnet, ssh, linux, unix, windows, hypervisors, and even IBM iSeries (AS-400). However, despite all the cool things one can do with PuTTY, the default out-of-the-box-settings leave a good bit to learn.
For a long time, I put up with some less than optimal settings. But over time, I learned what worked best for me. The purpose of this post is to share that with you.
Download from: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Hint: I prefer the windows installer. However, whatever you do, make sure you get the whole suite (unless you know you don’t need it)
Launch PuTTY and configure “Session” section
user@host is handy for auto-login. I prefer to place my server name before my username in the saved sessions because the sort order will be maintained as the list grows.
Configure the “Terminal > Bell” section
I have found it preferable not to disable the bell if it is overused.
Configure the “Window” Settings
This is one of the most important settings. The default of 200 lines of scrollback is just not enough. I find 20000 to be more useful. Also, the window size should be set according to your screen size and preferences.
Configure “Window > Appearance” settings
I find that the Luicida Console 14 point font is very easy on the eyes. Keep in mind I’m usually using a 27″ or 30″ display at 2560 pixels wide, so I can afford the extra size of 14pt. However, even on smaller screens, I still find it nicer to be able to read effortlessly and see less than the other way around. Just give it a try :)
Configure the “Window > Translation” settings
As of a few years ago, Linux began to use UTF-8 character encoding by default. This means that if your terminal is set to latin1 or similar, then each single multi-byte-character is literally interpreted as multiple latin1 characters, mostly drawn as out-of-place accented letters and various symbols.
So in my experience, it is best to use UTF-8 when connecting to Linux.
Configure “Window > Selection” settings
You need to decide here if you want an important safety precaution. Under the “Compromise” setting above, right-click will paste whatever is on the clipboard… even if you were just blogging about sudo rm -rf /
So, think that over pretty hard. The first option of “Windows” will bring up a right-click menu with a convenient “Paste” option. Also, you can simply us SHIFT+INSERT to paste in PuTTY.
Configure “Window > Colours” settings
If you can read dark-blue-on-black, then your vision is in another “spectrum” than mine. Check out the difference here:
Simply select “ANSI Blue” and change the RGB values to 112, 112, 255.
Configure “Connection” settings
It is helpful to send a null packet every once in a while to keep sessions alive.
Configure “Connection > SSH” settings (Update)
David Aldrich pointed out in a helpful comment that “I also think it is probably worth enabling SSH compression if working over a slow connection.”
Configure “Connection > SSH > Auth” settings
If you use SSH Agent forwarding (eg pagent) to allow you to “hop” from one server to another, then PuTTY must be told to enable Agent Forwarding. There are some security issues with this setting when connecting to an untrusted server, so please understand them first.
Configure “Connection > SSH > Tunnels”
If you want to connect to a MySQL or PostgreSQL service running on the host you are connecting to, but have all communication encrypted and sent via SSH tunnel, here is how to set that up.
Keep in mind that your Windows OS you are on must have the source port free, so if you are ALSO running MySQL locally, then pick a different local port number like 13306.
Once your SSH session is established, then you can connect to localhost port 13306 and it will be tunneled to the remote server on 3306. Cool!
Finally!!! Don’t forget to save your session.
(hint: press the “Save” button)
And that’s it! The basic PuTTY settings that I use which work quite nicely.
Hope this helps.
Very helpful, thanks. I also think it is probably worth enabling SSH compression if working over a slow connection.
Hi David, thank you for the helpful tip. I’ve updated the post accordingly.
How to copy files from windows to Linux machine using putty
I suggest you use FileZilla or WinSCP for this. Both can take advantage of a Putty keypair. Step 1: setup a working SSH connection using PuTTY. I suggest you run pagent.exe and add your key (see icon in system tray, right click, and add key). Then after you verify PuTTY connection, use WinSCP or FileZilla to connect to the server on port 22 with your username (no key needed because it is provided by pagent.exe).