Start a new topic
Implemented

[Putty] Existing Saved Sessions Support

Hi Stefan,

Thank you for your great product.


RoyalTS already has the support of custom Putty executable. That is awesome because RoyalTS users can use latest versions of Putty as soon as possible.


RoyalTS generates custom Putty session (TEMP_SESSION_*) and runs Putty with it:

putty.exe -load "TEMP_SESSION_67613" -pw "lystor"


But the problem is that the RoyalTS does not support all options of Putty. Also Putty adds new options with new releases or changes existing.


Please add to RoyalTS the possibility to input the name of existing saved Putty session in properties of "Terminal Connection". RoyalTS should set it in Putty args with ssh hostname and username.


Example:

putty.exe -load SESSION_NAME -ssh localhost -l lystor -pw lystor


https://the.earth.li/~sgtatham/putty/0.72/htmldoc/Chapter3.html#using-cmdline


This will give users RoyalTS the ability to use all the functionality of Putty and existing Putty sessions with tons of tweaks.


Thank you

 

Regards,
Mykola


Hi,


thanks for the feedback. I've tweaked the UI a bit. With the next release you can do the following:

On the PuTTY connection main page, you can select an existing session (as you can right now).

You will still be able to enter/set a hostname and port.

If a hostname is set, it will be used otherwise it will take the hostname from the saved session.

If credentials are configured, they are also passed on.


This way you can setup a "template" connection in PuTTY and use these settings for your connections.


Regards,
Stefan


1 person likes this

Hi Stefan,

Thank you for this feature.

It is amazing!

---

But I found a small bug in 5.1.10920:

RoyalTS sets HostName + UserName + PublicKeyFile keys in Windows Registry for "SSH Connection" type but it doesn't set PublicKeyFile for "Existing Putty Session" type so private key authentication doesn't work.

---

I think RoyalTS should not change the existing Putty profile and always pass hostname + username + password + private key in Putty command line (for example once username is saved in session, Putty will never ask for it but usernames and keys may differ between hosts):

# putty.exe -load SESSION -ssh localhost -l USERNAME -pw PASSWORD
# putty.exe -load SESSION -ssh localhost -l USERNAME -i PRIVATE_KEY.ppk 


Thank you

Thanks again for your input. I've changed the behavior and now use the CLI options to pass on this information to the session. The next beta release will have this on board.


Regards,
Stefan

Hi Stefan,


Private key authentication still doesn't work in 5.1.10927 :(


Cause: RoyalTS doesn't pass username and private key in Putty command line (-l USERNAME -i PRIVATE_KEY.ppk)  if "Terminal > Credentials > Private Key File" set or existing credential with private key selected. Only session and hostname exist.

 

Without private key specified RoyalTS sets session + hostname + username + password in command line as expected.


Please fix this small bug.

Thank you

It seems that the connection specific key file settings are not honored anymore. Thanks for bringing this to my attention. I will fix this for the next release. 


Regards,

Stefan

Hi again! I've just uploaded a new build which should resolve this issue:

https://download.royalapplications.com/RoyalTS/RoyalTSInstaller_5.01.11001.0.msi


Can you download and test all the scenarios?


Thank you!

Hi Stefan,


I tested 5.01.11001.0


RoyalTS now adds "-l USERNAME -pw PASSWORD" to Putty command line even if private key specified.


"-i PRIVATE_KEY.ppk" is still missing in args.


I've created another build which should resolve the issue:

https://download.royalapplications.com/RoyalTS/RoyalTSInstaller_5.01.11003.0.msi


Let me know if this one works as expected.


Regards,
Stefan

Hi Stefan,

Putty process is forked with valid args in both username + password and username + private key combinations.

But now RoyalTS is not able to connect to Putty automatically.

It always displays "External application window not found" window.

If user selects valid Putty process RoyalTS attaches to it successfully.

I'm not seeing this issue. Are you using a custom PuTTY executable?

Hi Stefan,


The issue persists in 5.1.10927 / 5.01.11001.0 / 5.01.11003.0 with both default and custom Putty executable.


%appdata%\code4ward was removed on each test.


Custom Putty profile was created with default settings.


The issue absent if type "SSH connection" is used instead of "Existing Putty Session".


STR:


1. Create new document

2. Add new terminal (putty)

- Display Name: test1

- Connection type: Existing Putty Session

- Putty Session: test1

- Computer Name: 10.10.21.21

- Credential: Specify username and password

- Username: root

- Password: root


Process:

"C:\Users\lystor\AppData\Local\Temp\Royal TS V5\Plugins\107df0a3-eab8-40ee-87f2-cc8a310f9269\RoyalTS_PuTTY64.exe" -load "test1" 10.10.21.21 -l root -pw "root"


OS: Windows 10


I'm not able to repro the issue on my side. Is it possible that your template session you are using is configured to use a custom window title? Royal TS needs to identify the window so that it can embed it correctly. Can you check the PuTTY setting under Windows -> Behavior


This is the configuration I have:

Can you check the PuTTY setting under Windows -> Behavior


I have the same settings as yours.


> Is it possible that your template session you are using is configured to use a custom window title? 


Nope


I have removed the branch Computer\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\ using Registry Editor and created new session with all default settings using C:\Users\lystor\AppData\Local\Temp\Royal TS V5\Plugins\107df0a3-eab8-40ee-87f2-cc8a310f9269\RoyalTS_PuTTY64.exe.


P.S. On first connect to new host (when Putty displays "Putty Security Alert" dialog with new fingerprint and user should press "Yes / No" button) RoyalTS always connects to Putty process.


On second connect to the same host (when fingerprint is already saved into Computer\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys) the issue occurs.

Still not able to reproduce it on my side. Can you record a video which shows the issue? Maybe I can see something in the window title or so which prevents Royal TS to identify the putty window on your machine. If you don't feel comfortable to post this video here, feel free to open a support ticket.

Login or Signup to post a comment