≡ Menu


This is an user contributed article.

PuTTY is a terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols. You can use putty for remote login or to control your router connected via serial devices.

By default PuTTY stores the session information in the registry on Windows machine. If you have several PuTTY sessions stored in one laptop and would like to transfer those sessions to another laptop, you need to transfer HKEY_CURRENT_USER\Software\SimonTatham registry key and value as explained below:

Export the PuTTY registry key on source windows machine

Click on Start -> Run -> and enter the following regedit command in the run dialog box, which will place the PuTTY registry key and value on your desktop in the putty-registry.reg file. Please note that the name of the registry key (Simon Thatham) is the author of PuTTY.

regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham

You can also launch the registry and interactively export the registry key value as shown below. Click on Start -> Run -> regedit -> Click File menu -> Click Export menu-item -> Enter HKEY_CURRENT_USER\Software\Simontatham in the "Selected branch" -> Save the putty-registry.reg to your desktop.

Import the PuTTY registry key on destination windows machine

Transfer the putty-registry.reg to the destination Windows machine. Right click on the .reg file and select Merge as shown below. This will display a confirmation message: Are you sure you want to add the information in putty-registry.reg to registry?. Click on 'Yes' to accept this message.

Launch the putty to verify the new sessions are transferred successfully. The registry key merge will not delete the previous PuTTY sessions. Instead, it will merge the entries to the existing PuTTY sessions on the destination windows machine.

You can also import the registry key and value interactively: Click on Start -> Run -> regedit -> Click File menu -> Click Import menu-item ->select the putty-registry.reg -> click on Import, to import the PuTTY sessions to the destination windows machine.

Turbocharge PuTTY with 12 Powerful Add-Ons explains about some modified versions of the PuTTY that stores the session information in a file instead of Windows registry.

How do you disconnect inactive user sessions?

One of our regular reader hall sends an interesting question:

I work for a small company and most user login to centralized Linux server. I’d like to
automatically log out all inactive users from server for various reasons. How do I disconnect inactive user sessions?

To be frank, I don’t have any clear cut answer to question. There are at least 4-5 shells installed on a typical Linux installation. Also most user have has control over their own environment and user can switch to a different shell.

I hope our reader or seasoned UNIX admin can help to answer this question. Please share the experiences and advice in the comments.

Update: Checkout answer below in comments!

Linux: Burn multi session CDs on Linux

Under Linux you can use tool called cdrecored (use to record audio or data Compact Discs) with mkisofs (use to create an hybrid SO9660/JOLIET/HFS filesystem with optional Rock Ridge attributes ) for this purpose.

Step #1: Create first session as follows

1) Create an iso image first:

# mkisofs -R -o /tmp/cd.iso /backup/06-07-2004/


  • -R : Uses Rock Ridge naming convention/attributes
  • -o : Name of new iso file (cd.iso)
  • /backup/06-07-2004/ : Everything in /backup/06-07-2004/ will be put into cd.iso file

2) Burning the disk (or an ISO image) for first session:

# cdrecord -dev=0,0,0 -multi -data -v -eject -speed=4 /tmp/cd.iso


  • -dev=0,0,0 : device number (tip you can use cdrecord -scanbus command to get this number)
  • -multi : Start multi session disk
  • -data : This option required for HP and Sony CD Writer only.
  • -v : Verbose i.e show info while burning the disk
  • -eject : Ejects the CD when done
  • -speed=4 : Write speed (4x)
  • cd.iso : Name of image being burned

3) Mount cdrom and see the contains:

# mount /mnt/cdrom
# ls /mnt/cdrom
# rm -f /tmp/cd.iso

OR< pre># mount /dev/hda /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/cd.iso
4) You can also verify that how many sessions written so far:

# umount /mnt/cdrom
# cdrecord -dev=0,0,0 -toc


  • -dev=0,0,0 : Device number
  • -toc : Retrieve and print out the table of content

Step #2: Burning the disk (or ISO image) for next session

Next session is bit tricky. You need to specify last sessions starting and ending sector numbers this information can be obtained from the following command:

# cdrecord -dev=0,0,0 -msinfo



1) Create next session ISO file:

# mkisofs -o /tmp/ses2.iso -R -V session2 -C $(cdrecord -dev=0,0,0 =msinfo)
-M 0,0,0 /backup/07-07-2004


  • -C $(cdrecord -dev=0,0,0 –msinfo) : This option is needed when mkisofs is used to create the image of a second session or a higher level session for a multi session disk
  • -M 0,0,0 : Specifies path to existing iso9660 image to be merged.

2) Burning the disk (or an ISO image) for second session:

# cdrecord -dev=0,0,0 -multi -data -v -eject -speed=4 /tmp/ses2.iso

3) Mount cdrom and see the contains:

# mount /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/ses2.iso


# mount /dev/hda  /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/ses2.iso

Note: When you wish to close disk (multi session cd), omit the -multi option for last session.

Online references: