[geeks] SSH clients for Winblows2K
Joshua D Boyd
jdboyd at cs.millersville.edu
Thu Oct 17 09:41:22 CDT 2002
On Thu, Oct 17, 2002 at 09:24:44AM -0500, Brian Dunbar wrote:
> It's storing the session info in the registry. But if I keep it on a
> network drive, an access it from another system, my session info is lost.
> Is there a quick n dirty method for keeping session info in a .ini file?
Are you sure it is putting it in the registry? I'd long thought that it
was storing it in C:\WINDOWS\putty.rnd, but I only assumed it, I don't
know it for sure. I can't easily edit the registry here at work, so I
can't search the registry.
Perhaps it is time to hit the documentation. Hmm, I was wrong it does
use the registry. Also, the faq says:
A.1.5 Does PuTTY support storing its settings in a disk file?
Not at present, although section 4.21 in the documentation gives
a method of achieving the same effect.
The method in 4.21 (posted after the .sig) is a hack alright, but it
might work for you.
--
Joshua D. Boyd
4.21 Storing configuration in a file
PuTTY does not currently support storing its configuration in a
file
instead of the Registry. However, you can work around this with a
couple of batch files.
You will need a file called (say) `PUTTY.BAT' which imports the
contents of a file into the Registry, then runs PuTTY, exports
the contents of the Registry back into the file, and deletes the
Registry entries. This can all be done using the Regedit command
line options, so it's all automatic. Here is what you need in
`PUTTY.BAT':
@ECHO OFF
regedit /s putty.reg
regedit /s puttyrnd.reg
start /w putty.exe
regedit /e puttynew.reg
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy puttynew.reg putty.reg
del puttynew.reg
regedit /s puttydel.reg
This batch file needs two auxiliary files: `PUTTYRND.REG' which
sets
up an initial safe location for the `PUTTY.RND' random seed file,
and `PUTTYDEL.REG' which destroys everything in the Registry once
it's been successfully saved back to the file.
Here is `PUTTYDEL.REG':
REGEDIT4
[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
Here is an example `PUTTYRND.REG' file:
REGEDIT4
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
"RandSeedFile"="a:\putty.rnd"
You should replace `a:\putty.rnd' with the location where you
want
to store your random number data. If the aim is to carry around
PuTTY and its settings on one floppy, you probably want to store
it
on the floppy.
More information about the geeks
mailing list