Introduction
Help for running pwin2lin.pl to convert PuTTY sessions from Windows to Linux.
Details
Export the PuTTY registry settings from Windows: Click on Start -> Run
Type in 'regedit' and hit Enter.
Navigate to:
HKEY_CURRENT_USER\Software\SimonTatham\
Right click the 'PuTTY' folder and choose 'Export'. Save the registry file to your Linux machine and run pwin2lin from a shell (chmod 755 first):
./pwin2lin.pl
Examples:
Running the script alone:
foo\@bar:~\$ ./pwin2lin.pl
Specify files from the command line:
foo\@bar:~\$ ./pwin2lin.pl myPuttySessions.reg /home/foo/.putty
Thank you for this script.. works fine.
Frits.
Thanks, it works!
Didn't work for me at first... Had to edit pwin2lin.pl file and change from UTF-16LE to UTF-8. Then it worked. Once was working, it's nice... saves me a lot of time as I had more than 100 servers in my putty list. Bruce
Hell yes. I was just looking for something like this. Thanks!
^...worked great btw.
Thanks for the great script. In case anyone is wondering, the output of this script goes into the ~/.putty/ folder.
This worked great! thanks!
Didn't work for me. It creates the dir 'sessions' but it's empty.
Works for me, but "(" and ")" characters in filenames are not converted to ASCII chars.
I had to log in and just say thank you! I was looking for a way to copy all 60 Cisco devices I had saved in my PuTTy connections, to my linux PC. This worked perfectly! Thank you, thank you, thank you.
Thank you !!!
Here's a command line method to generate the the registry key:
From the MS Windows Run dialog box, type: regedit /e "%userprofile%\desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham?
This works perfectly. Didn't think it was possible. Thanks a lot.
thanx a lot!
Had to change the name of a session that included a "/" and then it worked nicely. Thanks!
Awesome script! I think the comment about having to change from UTF-16LE to UTF-8 was a result of that person saving the .reg file as a plain .txt file? Also I had to change the PublicKeyFile?= path to a Linux path name instead of the Windows path name each session had, and while this would be a great option to add to the script, the existing script still saved me heaps of time and human error. A big thanks to the author :o)
Oh and I had to manually change the "FontName?=server:fixed" line to "FontName?=client:DejaVu? Sans Mono 14". I guess something is lost in the conversion so it defaults to "server:fixed". Again, another great feature to add if you're looking for ideas :P I'd make the changes myself, but my Perl is rusty (read: it's not bash, so I'm screwed).
i use ubuntu 12 . and script didnt work for me
is there anyone who tried to use this script on Debian 7 , or Ubuntu ??
who can migrate this script to BASH ?
Initially the script only created an empty 'sessions' directory. Turns out my registry keys were called [...]Simontatham[...], while the script assumes [...]SimonTatham?[...]. After changing the "T" from upper to lower case at approximately line 76 in pwin2lin.pl (search for e.g. "HKEY" in the script), it works perfectly (except the need for changing the path to the private key, as someone else mentioned). Thanks for the script - it saved me a lot of time.
Worked perfectly. Thanks!
great, works great !
thank for your script.
I had to fix PublicKey? path (windows path) so I use this command line :
find . -type f -exec sed -i 's|PublicKeyFile?=C:\\\\dev\\\\|PublicKeyFile?=/home/myname/keys/|' {} \;
I hope it could be helpful