SSH client

The first thought that I need a USB key is that I’ll need to maintain my servers in case of emergency, not in front of my desktop. As my servers are running FreeBSD, the most important thing I’ll need is a SSH client.

Among the open source clients, sshwindows and putty are the most popular two. I choose putty because

  1. I don’t like the cygwin layer
  2. I don’t need the server side thing
  3. putty is more featureful

Besides an SSh client, putty comes with many useful tools. The two I like most are

  1. pagent.exe that hold the key phase so that I don’t need to type it in again and again. It can work with other tools supporting SSH2 key auth, like filezilla.
  2. plink.exe works like a stream ssh client. It can be intergrated with many other tools that needs an external ssh client. I’ve got it running with win cvs and unison.

However, putty is not a green software. It stores infomation in the registry. There are puttyconfer that could do the import and export thing, but it needs a .Net framework available on the PC. So I only keep it on my USB key to do config copy/mirror thing among my putty setups and using the reg file way to do config import/export on daily usage.

I found this solution somewhere on the net and hacked it on. Unfortunately I can’t find the original source. Here’s what I have:

start.bat:

@ECHO OFF
regedit /s putty.reg
#regedit /s puttyrnd.reg

end.bat:

regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy new.reg putty.reg
del new.reg
regedit /s puttydel.reg

puttydel.reg

REGEDIT4

[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]

For the first usage, run end.bat to get putty.reg on your desktop machine from the registry, and run start.bat to put them back. Then keep these files with putty. Whenever you are on a new machine, run start.bat to import the settings. If you change your settings on the new machine, run end.bat to get the new settings exported. This will also delete the info from the registry. If you don’t like that, comment the puttydel.reg line from end.bat.

And although putty can support CJK pretty good, we’ll still get trouble if there isn’t the font we set on the random box. pietty comes handy on this for CJK users. And one more feature I like most: It can detect links like http:// or ftp:// and I can click on it!

So most time when I get on a foreigh machine, run pagent.exe for my key, run start.bat to import my settings, run pietty for the work, and run end.bat to do the cleanup.

Tags: , , , ,

Post a Comment

You could use <code type="name"> to get your code colorized

Your email is never published nor shared. Required fields are marked *

Close
E-mail It