CPM - How can I test SSH Key Connection from CPM Server?

CPM - How can I test SSH Key Connection from CPM Server?

81
Created On 11/10/26 11:03 AM - Last Modified 11/10/26 15:56 PM


Objective


How can I test SSH Key Connection from CPM Server?

Environment


11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6;12.7;13.0;13.2;13.1 Privileged Access Manager (PAM, self-hosted) Central Policy Manager (CPM)

Procedure


//Test SSH Key Connection from the CPM Server using PUTTY. 
  • Login to PVWA and retrieve the key for the account in question.
  • If the key starts with the following format, then we will need to convert it to. PPK format.

-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----

  • Install PuTTY and PuTTYgen on CPM Server.
  • Next launch PuTTYgen from the Windows Programs list.
  • Click "Conversions" from the PuTTY Key Generator menu and select "Import key".
  • Navigate to the OpenSSH private key and click "Open".
  • Under "Actions" / "Save the generated key", select "Save private key".
  • Don't use passphrase
  • Save the private key to the desktop as "TestingKey.ppk".
  • Open the converted file to verify that the key format starts with 

PuTTY-User-Key-File-2: ssh-rsa

  • PuTTYgen tool can be closed and launch PuTTY.

Connect to the Server with Private Key

  • Enter the remote server Host Name or IP address under "Session" exactly how its specified in the PVWA.

Session.PNG

  • Navigate to "Connection" > "SSH" > "Auth".

image.png

  • Click "Browse..." under "Authentication parameters" / "Private key file for authentication".
  • Locate the "TestingKey.ppk" private key and click "Open".
  • Once that’s done click open again to log into the remote server with key pair authentication.
//Test SSH Key Connection from the CPM Server using PowerShell.  If CPM is hosted on Windows Server 2019 and above
  • Open PowerShell
  • Specify the location where the key is saved.  Example: cd C:\Users\vaultadmin01\Desktop\
  • ssh root@1.1.1.1 -i '.\Operating System-ACMEUnixviaSSHKeys-1.1.1.1-root'
  • You may get the following error when running the command above, that is due to permission. image.png
  • Right click on the key file TestingKey.ppk => Properties => Security => Advanced => Disable Inheritance =>select “Convert inherited permissions into explicit permissions on this object”  => Remove all users including system except the current logged in user. 
  • Once that’s done try again you shouldn’t get the above errors.
Note: when testing using PowerShell a .ppk format is not supported.
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000011v0CAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail