Comments (16)
it appears that SuperPutty "sessions" are different from vanilla putty
connection sessions. "import sessions" refers to importing SuperPutty sessions,
not vanilla putty sessions.
without the ability to import my long list of existing vanilla putty
connections, export/import of SuperPutty sessions is VERY much putting the cart
before the horse.
Why not read the existing vanilla putty sessions from the registry?
Original comment by chiposaur
on 16 Jun 2010 at 3:04
- Added labels: ****
- Removed labels: ****
from superputty.
Hmm.. yeah, I got to the same end. Here is what you can do:
- create only one connection and export it so you have a sample;
- use a regular text editor (other than notepad) and make the entries on one
line so it is easier to edit;
- find all your putty connections from the registry using:
reg query HKCU\Software\SimonTatham\Putty\Sessions
Using the information, edit the sample.xml, creating a new line for each of
your connections.
Note that the element <PuttySession>whatever entry</PuttySession> *has* to
match whatever entry you have on your putty configurator so SuperPutty will use
the settings from putty and you'll have your window as expected (otherwise, a
black&white window will be seen)
Works for small number of connections (I have less than 10) but for large
numbers, you have to be creative with the editing. Best is to find a text
editor that is capable of column selection/copy/paste, which seems a feature
remarkably under-explored.
I have attached a sample with one entry, just in case anyone is interested. You
have to copy/past the same line over and over and modifying it.
When you have your .xml, import it back in SuperPutty (works like a charm).
-Alex
Original comment by [email protected]
on 17 Jun 2010 at 9:57
- Added labels: ****
- Removed labels: ****
Attachments:
from superputty.
this can be work around. and its okay to do this activity if have 5 10
connection. I have almost 30 40 connection. and making importable xml file with
all required details is not good efforts :(
Original comment by [email protected]
on 18 Jun 2010 at 5:24
- Added labels: ****
- Removed labels: ****
from superputty.
how about this for crazy. . . i had considered using this program and
discovered i couldn't import my list of sessions... only to come around here
that i'd been here before looking for an answer to the exact same lack of
developer foresight. pretty discouraging.
Original comment by chiposaur
on 18 Jan 2011 at 12:55
- Added labels: ****
- Removed labels: ****
from superputty.
Yes, this is the FIRST thing I looked for as well because I have ~100 putty
sessions saved in the registry, I guess I can write a perl script to take the
putty registry settings and put them in the xml format for SuperPuTTY. IF I do
that i'll post the script here.
Original comment by [email protected]
on 1 Feb 2011 at 12:52
- Added labels: ****
- Removed labels: ****
from superputty.
This script will output a list of the putty sessions by ip address (sorry no
names) into a properly formatted XML file for suuperputty import.
This script needs the following file in the same directory:
The registry entries for putty saved as a txt file named registry.txt
#!/usr/bin/sh -vx
echo '<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSessionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
' > superputty-session-list.xml
grep rsa2@22 registry.txt | awk -F : '{print $2}' | awk -F \" '{print $1}' |
while read IP
do
echo $IP
echo '<SessionData> <SessionName>'$IP'</SessionName> <Host>'$IP'</Host>
<Port>22</Port> <Proto>SSH</Proto> <PuttySession>myhostname
console</PuttySession> <Username>root</Username> <LastPath>.</LastPath>
<LastDockstate>Document</LastDockstate>
<AutoStartSession>false</AutoStartSession> </SessionData>
' >> superputty-session-list.xml
done
echo "</ArrayOfSessionData>" >> superputty-session-list.xml
Original comment by [email protected]
on 1 Feb 2011 at 2:26
- Added labels: ****
- Removed labels: ****
from superputty.
there is a new version of superputty, which can import existing putty sessions
try that.
Original comment by [email protected]
on 5 May 2011 at 7:46
- Added labels: ****
- Removed labels: ****
from superputty.
to save the time of anyone following this thread, there is no new version of
superputty. the only download available is from 2009.
[email protected] if you meant something else, then you should link it.
Original comment by chiposaur
on 5 May 2011 at 1:51
- Added labels: ****
- Removed labels: ****
from superputty.
I think this is what vikasch means: https://github.com/phendryx/superputty
Original comment by [email protected]
on 6 May 2011 at 8:34
- Added labels: ****
- Removed labels: ****
from superputty.
Hereby a (non-perl) command script to export and process puTTY 0.60 registry
sessions into a superPuTTY XML import format. Given that the new code now has
import, this is primarily useful for transferring configurations from other
systems.
The script is fragile (if you cancel midway, the shell session's variables get
corrupted...) but it's tested and confirmed working with the old (pre3) and the
new (1.0.3) superPuTTY code on both XP and Vista/windows 7.
Usual absence of any warranty applies. Lots of tricks used as you can see. I
won't spend any more time on this one.
Usage:
1) copy the text between the lines or use the attached txt file. save it to
your desktop as putty_export.cmd and then double-click it, or call it from a
command line.
The produced file will end up in your %HOMEPATH% if run from the desktop.
change OUTPUT to suit if that's undesirable.
--- COPY BELOW THIS LINE ---
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
IF NOT DEFINED REPLACEME (
REM This IF statement works around a misinterpreation of the %20, enabling
conversion to a space.
SET REPLACEME=@
CALL %0 !REPLACEME! !REPLACEME!
EXIT /B
)
GOTO :START
REGKEY_BASE=HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\ (54 chars)
:START
SET OUTPUT=.\puttyconfig.xml
SET COUNTER=0
REM These entries are for shortcircuiting purposes.
SET IS_HostName=SERVER_IP
SET IS_Protocol=PROTOCOL
SET IS_PortNumber=PORT
SET IS_UserName=USER_NAME
SET REG=reg query HKCU\Software\SimonTatham\PuTTY\Sessions /s
CALL :PREP_OUTPUT
ECHO Beginning export and processing...
FOR /F "tokens=1,2,3*" %%a IN ('%REG%') DO (
CALL :PARSE_VAR "%%a" "%%b" "%%c"
)
REM we write the last entry if any have been found at all.
IF DEFINED PUTTYSESSION CALL :WRITE_ENTRY
ECHO ...finished processing %COUNTER% entries.
CALL :FINISH_OUTPUT
GOTO :EOF
REM %2 has overlap with %20, which should be a space, so we remap to work
around this.
REM %1, -%2, %3, %4
:PARSE_VAR
IF "%~1"=="" GOTO :EOF
SET V=%~1
IF "%V:~0,4%"=="HKEY" (GOTO :IF_NEWENTRY) ELSE (GOTO :IF_NEWVALUE)
:IF_NEWENTRY
IF DEFINED PUTTYSESSION (CALL :WRITE_ENTRY) ELSE (ECHO Looking for first entry...)
SET PUTTYSESSION=%V:~54%
IF DEFINED PUTTYSESSION SET PUTTYSESSION=!PUTTYSESSION:@0= !
GOTO :EOF
:IF_NEWVALUE
SET VAR_NAME=%~1
IF NOT DEFINED IS_!VAR_NAME! GOTO :EOF
IF NOT "%~2"=="" SET VAR_TYPE=%~2
REM IF NOT "%~3"=="" (
IF "%VAR_TYPE%"=="REG_DWORD" (SET /A VAR_VALUE=%~3 + 0) ELSE (SET VAR_VALUE=%~3)
REM )
CALL :SET_!VAR_NAME!
GOTO :EOF
:SET_HostName
SET SERVER_IP=%VAR_VALUE%
GOTO :EOF
REM we have specific adjustments as the old SuperPuTTY is a little
case-oversensitive for protocol types...
:SET_Protocol
IF /i "%VAR_VALUE%"=="telnet" SET PROTOCOL=Telnet
IF /i "%VAR_VALUE%"=="raw" SET PROTOCOL=Raw
IF /i "%VAR_VALUE%"=="rlogin" SET PROTOCOL=Rlogin
IF /i "%VAR_VALUE%"=="serial" SET PROTOCOL=Serial
IF /i "%VAR_VALUE%"=="ssh" SET PROTOCOL=SSH
REM SET PROTOCOL=%VAR_VALUE%
GOTO :EOF
:SET_PortNumber
SET PORT=%VAR_VALUE%
GOTO :EOF
:SET_UserName
SET USER_NAME=%VAR_VALUE%
GOTO :EOF
:PREP_OUTPUT
IF EXIST %OUTPUT% copy %OUTPUT% %OUTPUT%-old.xml
ECHO ^<?xml version="1.0" encoding="utf-8"?^>> %OUTPUT%
ECHO ^<ArrayOfSessionData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"^>>> %OUTPUT%
GOTO :EOF
:WRITE_ENTRY
SET /A COUNTER=%COUNTER% + 1
ECHO saving !PUTTYSESSION! ...
ECHO ^<SessionData^>>> %OUTPUT%
ECHO ^<SessionName^>%PUTTYSESSION%^</SessionName^>>> %OUTPUT%
ECHO ^<Host^>%SERVER_IP%^</Host^>>> %OUTPUT%
ECHO ^<Port^>%PORT%^</Port^>>> %OUTPUT%
ECHO ^<Proto^>%PROTOCOL%^</Proto^>>> %OUTPUT%
ECHO ^<PuttySession^>%PUTTYSESSION%^</PuttySession^>>> %OUTPUT%
IF DEFINED USER_NAME (ECHO ^<Username^>%USER_NAME%^</Username^>>> %OUTPUT%)
ELSE (ECHO ^<Username^>^</Username^>>> %OUTPUT%)
ECHO ^<LastPath^>.^</LastPath^>>> %OUTPUT%
ECHO ^<LastDockstate^>Document^</LastDockstate^>>> %OUTPUT%
ECHO ^<AutoStartSession^>false^</AutoStartSession^>>> %OUTPUT%
ECHO ^</SessionData^>>> %OUTPUT%
GOTO :EOF
:FINISH_OUTPUT
ECHO ^</ArrayOfSessionData^>>> %OUTPUT%
GOTO :EOF
--- COPY ABOVE THIS LINE ---
Original comment by [email protected]
on 9 May 2011 at 7:18
- Added labels: ****
- Removed labels: ****
Attachments:
from superputty.
The "File >> Copy PuTTY Sessions" Menu task works on SuperPutty 1.0.3. Thanks!
Original comment by [email protected]
on 28 Jun 2011 at 5:17
- Added labels: ****
- Removed labels: ****
from superputty.
This option "File >> Copy PuTTY Sessions" is missing from the latest 1.2
version.
Original comment by [email protected]
on 25 Apr 2012 at 6:53
- Added labels: ****
- Removed labels: ****
from superputty.
Issue 93 has been merged into this issue.
Original comment by [email protected]
on 13 May 2012 at 4:48
- Added labels: ****
- Removed labels: ****
from superputty.
New release will have
File -> Import Sessions -> From PuTTY settings
Sessions will be put into a folder named, ImportFromPutty.
Original comment by [email protected]
on 13 May 2012 at 4:49
- Changed state: Accepted
- Added labels: ****
- Removed labels: ****
from superputty.
v1.2.0.7
Original comment by [email protected]
on 14 May 2012 at 10:33
- Changed state: Fixed
- Added labels: ****
- Removed labels: ****
from superputty.
To Import your superputty sessions, the below file has all of your putty
sessions, Copy this file
C:\Users\<YourUserName>\Documents\SuperPuTTY\Sessions.XML to whereever you want
to.
Original comment by [email protected]
on 29 May 2013 at 6:09
- Added labels: ****
- Removed labels: ****
from superputty.
Related Issues (20)
- AboutBox: Urls are detected but nothing happens on mouse click HOT 2
- Possibility to have SuperPutty sessions w/o associated PuTTY Session Profile HOT 1
- Cannot open superputty HOT 5
- Setting to have the hostname not clear after opening a new session HOT 1
- Layout crashes out if Session dock is autohidden HOT 1
- Profiles HOT 2
- After using context menu of tray icon to exit SuperPutty it can't be started again HOT 5
- Change of option "Restore Window Size and Location" is only recognized after restart HOT 2
- Edit Session: "Default Settings" appears twice in combo box "PuTTY Session Profile" HOT 3
- Clear Window bar on closing session HOT 2
- TreeView: Wrong behavior of double click on +/- icon HOT 3
- Can't drag folders around the sessions tree HOT 6
- New Option: "Always start maximized" HOT 5
- Putty windows doesn't' attach HOT 5
- Error in folder name validation HOT 3
- SCP - Show double columns like FileZilla does HOT 4
- Post-login commands HOT 1
- Honor xterm escape sequences for tab titles HOT 6
- Show existing PuTTY registry sessions without needing to import them HOT 1
- Creating new session is possible even is no hostname/ip is enterd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superputty.