Running PuTTY

To load a saved session, you can create a batch file like so:

start "" putty -load host.domain.tld

You can even start multiple PuTTYs at once:

start "" putty -load hostA.domain.tld
start "" putty -load sessionB

Export your PuTTY sessions & settings saved to the registry:

  1. start regedit
  2. Move to [HKEY_CURRENT_USER\Software\SimonTatham]
  3. Export this tree to a file


Use pageant to load your private keys into memory. Create a batch file with the following contents and put it in the autostart folder:

@echo off
start "" "C:\programme\PuTTY\pageant.exe" c:\keys\myprivkey.ppk c:\keys\myotherprivkey.ppk 

Plink (PuTTY Link) is a command-line connection tool similar to UNIX ssh.

This will open an connection to host.example.com and enable Dynamic SOCKS-based port forwarding:

"c:\Program Files (x86)\Putty\plink.exe" -ssh -2 -D 10022 user@host.example.com

Open a saved session and run some commands:

"c:\Program Files (x86)\Putty\plink.exe" -load mysession "cd /; ls -l"

This will give you a directory listing of the root filesystem. plink logs in, executes the command(s) and logs out immediately.

If there are a lot of commands to execute, read them from a file:

"c:\Program Files (x86)\Putty\plink.exe" -load mysession -m commands-file


If you want to improve your PuTTY configuration the following two sites are really worth reading:

After reading these blogposts, I decided to tune my own configuration a bit. So I adjusted my “Default Settings”, exported them with regedit and compared them to one of my reference sessions.

The diff boiled down to the following excerpt:

Windows Registry Editor Version 5.00
"Font"="Lucida Console"

To apply the new settings to a couple of stored session you can simply replace “myhost” with the name of your session to change, save and double click.

Remember: if there is a space in your saved session name this has to look like this: saved%20Session%20with%20space

One final suggestion: if you're not satisfied with the ANSI colorscheme of your terminal, have a closer look at http://ethanschoonover.com/solarized

windows/putty.txt · Last modified: 2013-12 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready