Introduction
The Windows version is just a few self-contained executables that can be run from portable devices.
However configuration data is stored in the Windows registry at [HKCU\Software\SimonTatham\PuTTY] which may not be accessible from portable devices or populated on different machines. Independent configuration data storage in files overcomes this problem.
There is a cumbersome
workaround with bat/reg files. Alternatively, Xming-portablePuTTY is able to elegantly use stored sessions and ssh host keys as files.
Xming-portablePuTTY is a complete alternative to all PuTTY's Win32 executables and the PuTTY Link for Xming SSH client. It is supplied under the same license as PuTTY, has built-in help and is made optimized for size.
Usage
Xming-portablePuTTY stores configuration data to file instead of the registry, and also reads existing registry entries. Every session and ssh host key is stored in a separate file. The default file location is in sub-directories, sessions and sshhostkeys, of the directory where an executable is being run.The path to the configuration file sub-directories, sessions and sshhostkeys, can be set via a one line entry in putty.conf. This file must be located in the same directory as the PuTTY executable being run and contain one of these three path types (';' begins a comment line)...
; Full path to configuration files:- location must begin with 'drive-letter:' e.g. X: ; sshk&sess=X:\somepath sshk&sess=D:\Portable PuTTY
; Path on the current drive:- location must begin with '\' ; sshk&sess=\somepath sshk&sess=\Portable PuTTY
; Full path via an environment variable:- location must begin with an %env% ; and that must begin with 'drive-letter:' e.g. %APPDATA% or %USERPROFILE% ; sshk&sess=%env%\somepath ; This is how putty.conf is supplied in the installer... sshk&sess=%APPDATA%\Portable PuTTYRules for the structure of putty.conf
- A comment line begins ';' and no blank lines or leading whitespace are allowed.
- Apart from comment lines, only sshk&sess=path line entry is valid with no whitespace either side of '='.
- Only the first found sshk&sess=path line is parsed and file contents then ignored after it.
- If putty.conf is not found, or it is badly formed, file locations default.
- Only the three path types above will work (e.g. no relative paths).
When sshk&sess is defined it is used as the location for the random seed file, PUTTY.RND. The seed file will then be portable if directory sshk&sess is on a portable device.
Xming-portablePuTTY is still able to read configuration data from the Windows registry. Sessions from the registry are marked [registry] on "PuTTY Configuration/Saved Sessions" and you can Load and then Save any sessions as files from here. In the command line -load option you need to append [registry] to the session name, if the session data is required from a registry entry, for example
>putty -load "session-name [registry]" >plink -load "session-name [registry]" xterm -lsand once the session is stored as a file
>putty -load session-name >plink -load session-name xterm -lsPuTTY Default Settings can be saved to a file that automatically loads at startup. 'Default Settings [registry]' are available read-only, if they exist, and a set of built-in defaults are automatically loaded anyway if no 'Default Settings [registry]' key or 'Default Settings' file exist. The file is named Default%20Settings (like the registry key), resides in the sessions directory, and its settings take precedence.
When the sshhostkey is found only in the registry (i.e. not found in file as well) you will be prompted to Move or Copy the key to file; or Cancel to do nothing. No writing of new or modified configuration data to the Windows registry is possible. Moving a key will however remove its registry entry.
Manual
General documentation on PuTTY is availableAcknowledgements
Xming-portablePuTTY is based on an idea from siteTable of Contents

The
PuTTY is copyright © 1997-2010 Simon Tatham.
Copyright © 2005-2010 Colin Harrison Some rights reserved


