Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
load savedsession file via command line? #33
Many thanks for the English GUI of this fine PuTTY fork
With stock PuTTY, as you know, sessions are stored in the windows registry;
On Windows, one can create a shortcut with the following content inside the target field:
and because my login username is already included in the session data, simply double-clicking the shortcut is enough to authenticate and establish the SSH tunnel
One of the most attractive features of your fork (iPutty) is the ability to do away with registry session storage, as in: export (load and save) the registry saved sessions (if present there) to local files, then use those files to load a session from (via the iPuTTY GUI); one can then remove all PuTTY registry keys, iPuTTY will be fine restoring saved sessions from files only...
However, the Windows shortcut template I posted above doesn't seem to work as expected; the
d-c the shortcut results in the iPuTTY GUI opening up, where I have to manually select+load the session from file and then hit Open; incidentally, the
What I would've hoped is the ability to auto-log in in one step, by simply d-c the shortcut, without the GUI poping up; in other words, how to specify in the command line a locally saved (session) file to be loaded by iPuTTY? Can you patch your code to that effect?
Thanks in advance for your consideration, apologies if what I request is already doable in a way I have simply overlooked/ am not aware of
... It would seem at least two (2) other PuTTY forks are already capable of the feature I'm requesting:
Perhaps the relevant code from these two could be implemented here; that way, I could permanently switch to iPuTTY, which is current (0.70.0) and has both "portable" and "Tray" capabilities
PuTTYTray is always created to open the session file when using the -load option in config.c
c = ctrl_radiobuttons(s, NULL, 'f', 2, HELPCTX(no_help), storagetype_handler, P(ssd), "Sessions from registry", I(STORAGE_REG), "Sessions from file", I(STORAGE_FILE), NULL);
Therefore, PuTTYTray does not work well.
Let's take a look at some more code to see if we can fix the problem.
All right, I modified it to use as follows.
You can choose one of the above methods.
Thanks for your immediate response!
What I did was just export (with iPuTTY) to a file my session saved (in the registry) with normal PuTTY, as you can imagine, that file contained no password info and I then, again, used the
I tried to do things as you suggested, but I'm afraid I hit another bug:
My username gets accepted, but not my password (log excerpt):
If I type-in my password in the terminal, then the tunnel is established!
Debugging this, I found that if I launch iPuTTY, load my saved session and then switch to the Connection -> Data tab, I am now seeing eleven (11) dots in the auto-login password input field (not the original 9), so it is my belief that when iPuTTY exits, the correct password gets mangled inside the local session file, hence a new auto-login will fail (i.e. the string sent to the server is not correct!).
... Most unfortunately, my OS is 32-bit, while the attached compile is 64-bit; kindly provide a x86 binary for me to test...
I fail to locate that commit hash in either the master/localization branch... how so?
Right. Attached binary is compiled by 64bit, and re-attache 32bit files.
And I checked the auto-login password functional test again, but it seems that I have no problem with the test results. It does not reproduce.
If push commit, the issue ends automatically. So I'm still committed to the local repository.
I do realise that (the ... "of course" part of my post) and I don't blame you in any way, I just stated, for emphasis, the obvious thing: Not being able to read Korean, it was hard for me to discover documented features (unless I "Google Translate" whole pages...).
Many thanks for this
I decided to start from scratch; I loaded default settings, then modified that to my needs/liking and saved to file an SSH session named SSH_STUNNEL_UK_1 (physically stored in "./sessions/SSH_STUNNEL_UK_1"); as you suggested in your step 1, I initially left the auto-login password field empty.
Some modifications from the defaults in that savedsession file are:
If I create a Windows shortcut with target:
Let me revisit the other issue I reported (already present in stable iPuTTY 0.70.0):
But what really defies logic is the following observation:
I can't code myself, but I do like testing/debugging issues; this is my small contribution towards making open source-ware better! However, in this case I've spent a bit more time than planned initially, still presented with riddles that seem difficult to solve, plus causing you all that extra work!
For the time being, I think I might stay with the somewhat older PuTTYtray (by FauxFaux) and/or kitty_portable; both of them don't present any of the issues discussed in this thread (and store sshkeys locally...).
One issue has been complicated by various problems.
I think there are three issues in the current ticket.
Can not load a file session from the command line. (Original issue)
In my opinion, the first issue seems to work well in the newly built version.
auto-login password does not work properly.
For this issue, it seems that the password in memory is correct, but the password retrieved from the session is incorrect.
The password stored in the session is encrypted when it is saved, and decrypted when it is loaded.
Perhaps I think, there is a problem due to differences in architecture or OS version.
I think this issue should be handled as a separate issue.
The host key is not saved as a file.
On this problems, I have no problem too. Perhaps the difference in circumstances seems to be causing problems.
However, there are other workarounds to this problem. iPuTTY has the ability to ignore hostkey check. See also #10
Finally, I am very grateful for your hard work on iPuTTY.
Hello again from cloudy/rainy Northern Greece (just this day) !
Are you aware of the English expression:
Couldn't agree more
... And a separate issue it surely is, for which I have new test data to contribute:
So, this bug is still there in the x86 flavour of iPuTTY (load from file - in the iPuTTY GUI - a saved session containing auto-login password info), even on Win7 x64 !
I then moved on to testing iPuTTY-0.70.1-git-9c935c4-win64 (first test binary attached in this thread, the one I couldn't run on my x86 OS);
Will have to, being able to only run the x86 binary on my OS; or load from file the session (which includes pw) via the cmdline/win shortcut (which, for some inexplicable reason, works; i.e. pw decrypted correctly from the cmdline, incorrectly when loaded via the GUI).
I don't think other PuTTY forks exist with the feature to store the pw inside a session file, but perhaps you could investigate the code in latest KiTTY_portable 0.70.0.3 x86, which does have that thing and works without issues in my 32-bit OS...
Even when testing iPuTTY-0.70.1-git-9c935c4-win64 on friend's Win7 SP1 x64 OS, upon first connection with the server, when I click
Many thanks for that; while it sort of lessens security, it retains portability in that it doesn't write to the host OS registry
Some general remarks:
It is you as the maintainer to decide which direction to move iPuTTY to, perhaps my issue reports/requests involved a more portable-friendly iteration of the app...
FTR. while I noted min OS requirement is Win7, I was successful in running iPuTTY-x86 in my older Windows Vista SP2 32-bit laptop, where everything works as intended (minus the issues reported here), except for Terminal Window Opacity (or transparency), which is of course a minor "cosmetic" feature, not diminishing functionality
No, it is you doing all the hard work with coding and then making it available to users
My best wishes+regards
The original issue is clearly resolved, so I close this ticket. And, additional issues will be tracked with other tickets.
And, from your advice:
KiTTY saves the password as plain/text. Therefore, there is no decryting problem.
Hi; if you're indeed saying that KiTTY stores the
If by your quoted statement you meant something else, then apologies for misunderstanding you...
I just noticed that this saved string changes each time KiTTY is launched and then exited; now the same line reads: