SSH KEY works when used from PSMP, SSH from a local machine (Windows CMD) and Putty. It does not work if used from PVWA (Server refused our key) (Access denied)

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

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

SSH KEY works when used from PSMP, SSH from a local machine (Windows CMD) and Putty. It does not work if used from PVWA (Server refused our key) (Access denied)

L4 Transporter

Hello,

We have an SSH key with this format (KeyFile.txt):

 

-----BEGIN OPENSSH PRIVATE KEY-----

-----END OPENSSH PRIVATE KEY-----

 

Now, target server is an EC2 Unix machine and If we try to use the Key from:

PSMP (via Cli): It works.

SSH from a local machine (from CMD windows): It works.

Putty: It works.

PVWA: It DOES NOT work.

 

When used by PVWA we get (Server refused our key) (Access denied)

Field_Content_versions_oct20__068Vy00000ocWuxIAE.png 

1) What are the correct steps to convert the key so it can be used by PVWA? What can we do to fix this and get access?

2) Why PVWA is refused while PSMP is accepted? are they not the same when connecting?

 

Thank you.

 

1 accepted solution

Accepted Solutions

L4 Transporter

For anyone with the same issue, is the psm version that is using 0.71, need to update the psm.

Try local putty 0.71 and local putty 0.83, 0.71 will fail and 0.83 will connect.

Or you can avoid PVWA by connecting directly with ssh or putty

 

 

Putty :<VaultUser>@<TargetUser>@<TargetAddress>#sshPort@<domain/proxy> (inside putty leave port 22)

 

or

 

ssh <VaultUser>@<TargetUser>@<TargetAddress>@<domain/proxy> -P port

 

View solution in original post

9 REPLIES 9

L4 Transporter

Hi @ABDOU LAZEZ HUSSIEN EL SHEREDI​ ,

 

Did you try to connect directly from the PSM server using the key?

What was the result?

L7 Applicator

Hi @ABDOU LAZEZ HUSSIEN EL SHEREDI​ 

 

Please convert the SSH key to PEM format and upload the converted key in the Vault. Then try it again via PSM to connect to target host using that key.

 

Hope it helps!

Hi @Uditha Arunasiri​ Thanks for the reply

From PSM I can connect using (putty from PSM) and can connect using (ssh from PSM via cmd ). I already converted the key to .pem/.ppk v2/ .ppkv3 and tried to uploade it to the account page in PVWA.

It works everywhere (PSMP/PSM/local Putty/Local SSH/PSM Putty/PSM SSH) except from PVWA (It keeps saying Server Refused or Key).

We already have other working accounts with SSH Key that are using the same platform. What a strange case.

Thanks for the patience.

Hi @Malhar Vora​ Thanks for the reply.

 I already converted the key to .pem/.ppk v2/ .ppkv3 and tried to uploade it to the account page in PVWA.

The Key already works in (PSMP/PSM/local Putty/Local SSH/PSM SSH/PSM Putty) except from PVWA (It keeps saying Server Refused or Key).

 

By " upload the converted key in the Vault."? The converted key is already uploaded in the PVWA account page.

We already have other working accounts with SSH Key that are using the same platform. What a strange case.

Thanks for the patience.

L7 Applicator

Hi @ABDOU LAZEZ HUSSIEN EL SHEREDI​ 

 

Please check that the public key on the EC2 instance matches the private key you uploaded and run command ssh-keygen -y -f <privatekey.pem> to compare that output against the line in ~/.ssh/authorized_keys.

 

On the PVWA accounts page, please check that UserName matches exactly the user on EC2 and Address is the correct DNS/IP.

 

Hope it helps !

Hi @Malhar Vora​ 

The public key is the same. Also the information's are correct in PVWA accounts page.

PSM 14.0.3.x and the target server is RHEL 9.x

At this point I'm wondering what the PVWA is using to connect? (Putty 0.81 and ssh from PSM works,PSMP works,local putty,local ssh works). Maybe the PVWA is using PSM-SSH that it's using a very old client putty client that the server is refusing?

@Malhar Vora​ 

So turns out PSM 14.0.3.x is based on v0.71 (Psm has its own putty).

I did my test by installing Putty 0.71 on my local PC, The key is not working. With Putty 0.83 on my local PC, the same exact key works.

At this point, is there a way to force psm-ssh to use putty 0.81 that we already have on our PSM C:\Program Files (x86)\CyberArk\PSM\Components\PuTTY.exe? or creating a new psm-ssh component that points to 0.81?

Another approach to force RHEL 9.x to accept putty v0.71 (Don't think it's a good idea).

@Uditha Arunasiri​ 

So turns out PSM 14.0.3.x is based on v0.71 (Psm has its own putty).

I did my test by installing Putty 0.71 on my local PC, The key is not working. With Putty 0.83 on my local PC, the same exact key works.

At this point, is there a way to force psm-ssh to use putty 0.81 that we already have on our PSM C:\Program Files (x86)\CyberArk\PSM\Components\PuTTY.exe? or creating a new psm-ssh component that points to 0.81?

Another approach to force RHEL 9.x to accept putty v0.71 (Don't think it's a good idea).

L4 Transporter

For anyone with the same issue, is the psm version that is using 0.71, need to update the psm.

Try local putty 0.71 and local putty 0.83, 0.71 will fail and 0.83 will connect.

Or you can avoid PVWA by connecting directly with ssh or putty

 

 

Putty :<VaultUser>@<TargetUser>@<TargetAddress>#sshPort@<domain/proxy> (inside putty leave port 22)

 

or

 

ssh <VaultUser>@<TargetUser>@<TargetAddress>@<domain/proxy> -P port

 

  • 1 accepted solution
  • 228 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!