It's possible to change the default configuration on Putty (PSM) and how to? I don't want putty to warn me that Diffie-Hellman group 1 is used.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

It's possible to change the default configuration on Putty (PSM) and how to? I don't want putty to warn me that Diffie-Hellman group 1 is used.

L1 Bithead
9 REPLIES 9

L7 Applicator

Afaik the PSM-SSH dispatcher is just a modified plink.exe, so figure out where in the registry plink.exe looks for these settings and change them.

L1 Bithead

you mean - PSMSSHClient .exe ?

L5 Sessionator

Hi @Sandro Talovic​,

You have to update the default registry hive to adapt the Simon Tatham's PuTTY suite configuration to your needs.

 

Follow steps from https://community.cyberark.com/s/article/00003645 to update the registry hive for PSMShadowUsers. As for the registry key and values to define in order to configure the PuTTY, do it on your desktop, check the values in your HKEY_Current_USER and set it as required on PSM. Note that you will have to delete existing Shadow Profiles for them to take new values into consideration.

L1 Bithead

Hi @Sandro Talovic​ ,

Did you manage to solve your problem? If it's the case, can you give me more details?

 

I tried to follow the instructions of @Sebastien Siegl​ but I could not find the registry folder for Simon Tatham or even a key containing "dh-group1-sha1". Even with the Default user mounted in the registry.

Regards,

Maxime

Hi Maxime

 

If you have Putty installed, you will find it under

 

Under

 

HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions\Default%20Settings

 

You will need to create the same path under default user

 

SOFTWARE\SimonTatham\PuTTY\Sessions\Default%20Settings

 

Please check article 000007989

 

 

Please look for KEX, the default value is ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1

 

As per your post, you can change it o

 

ecdh,dh-gex-sha1,dh-group14-sha1,rsa,dh-group1-sha1,WARN

Hi, In the ticket I created I mention : “I also look in the direction pointed by @ssiegl (CyberArk)​ but even with the hive loaded, I wasn’t able to find any key containing “dh-group1-sha1” like Putty does on my own computer in SimonTatham/Sessions/Default%20Settings/KEX Could you tell me how to do that? You can answer on the community's post so that it benefits everyone.” So I already walked the registry before creating the ticket and I also look for a key containing “dh-group14-sha1” (because looking for a keyname like KEX returns too many results” [cid:[email protected]] I was able to do it on my personal computer but not able to find the key on the PSM. We are running PSM version 10.8.0.1 and I can only find PSMSSHClient.exe and no putty.exe file in the component folder of Cyberark Regards, Maxime

Maxime

 

It is possible to manually create the all keys are possible but it would time consuming which makes this option less practical.

 

You can export the key from an machine another than PSM which has Putty installed. Or you can install Putty on PSM and then migrate the keys.

 

I spent sometime this afternoon to draft a detailed answer for you. It will be published as a Knowledge base article is it passes our internal review procedure in the later.

 

section 1. import the default PuTTy Session settings to PSM if it has not been imported before.

  You can skip this section if default Putty Session registry settings has been imported to PSM previously.

 

 a. On the PSM Server or any other machine that has a Putty installed. Launch Registry editor by running "regedit" from command prompt

 b. Export HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions\Default%20Settings

 save as a file. For example: DefaultPuTTy.reg

 c. Edit the .reg file, update the key location to [HKEY_USERS\DefaultPuTTy\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]

 d. copy the registry file to PSM server.

 e. Backup the registry of the PSM Server.

 f. Launch Registry Editor on PSM server and load a new hive that points to the default user's NTUSER.DAT by selecting HKEY_USERS then in the File menu the option Load Hive. Browse to and open C:\Users\Default\NTUSER.DAT (You may not be able to see NTUSER.DAT in the folder. Simply type into the filename box from C:\Users\Default and select Open)

 g. Name the new hive DefaultPuTTy. The name DefaultPuTTy should be used as it is referring to a name in the exported reg file done previously.

 h. Merge (or run) the attached DefaultPuTTy.reg file that was created as per the instructions above. The simplest way is by double clicking on the DefaultPuTTy.reg file.

 i. You will now see in the DefaultPuTTy hive in RegEdit and new keys in ~/Software/SimonTatham/PuTTY/Default%20Settings.

 j. Select the hive name under HKEY_Users then unload it by selecting from the File menu the option Unload Hive.

  

 2. Change default Algorithm slection policy configuration using registry editor

 

 a. On PSM server , launch registry editor

 b. Open the Microsoft Windows Registry Editor and load a new hive that points to the default user's NTUSER.DAT by selecting HKEY_USERS then in the File menu the option Load Hive. Browse to and open C:\Users\Default\NTUSER.DAT

 c. Open HKEY_USERS\DefaultPuTTy\Software\SimonTatham\PuTTY\Sessions\Default%20Settings. 

 d. The algorithm select order is from left to right , under KEX key.

 e. The default valut is ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1. the WARN represents the "warn below here" line from Putty interface.

 f. If user wants to mute Putty Security Alert on key-exchange alorithm completely. It can be updated to ecdh,dh-gex-sha1,dh-group14-sha1,rsa,dh-group1-sha1,WARN

 g. Select the hive name under HKEY_Users then unload it by selecting from the File menu the option Unload Hive. You will see the DefaultPuTTy hive is gone. The changes are applied to the NTUSER.DAT file so new profiles will use the settings.

 

 3. Remove all ShadowUser profle before a new connection test

 

 a.Press Windows key+R to Open the Run dialog box.

 b.Type lusrmgr.msc and hit enter.

 c. Delete all entries with PSM- and followed by numbers. Do not delete PSMConnect and PSMAdminConnect accounts.

 d. Now we can try the PSM-SSH connection. The new settings will be inherited.

 

Dear Dhuo, Thanks a lot for this detailed procedure. It looks really clear and I’m going to try it this weekend. Regards, Maxime

Hi (again), Thanks for the explanations, I was able to successfully import the keys on the PSMs and it’s working. Regards, Maxime
  • 1919 Views
  • 9 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!