Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Authentication with ssh private key ( No provider available)

avatar
Contributor

Hello,

 

in order to install a cluster using the CM-Wizard with the private key method i get the following error message:

 

 No provider available for Unknown key file

 

I used a custom user and select the respective .ppk file.

If i logged in via ssh from a remote machine with the same credentials, it works.

 

Do you have any ideas or solution?

 

Thanks and Regards,

 butkiz

1 ACCEPTED SOLUTION

avatar
ppk refers to Putty's custom format. You should use the key format used by
OpenSSH. there are tools to convert between these two formats.
Alternatively, you can use the ssh-keygen tool to create a fresh pair of
keys

Regards,
Gautam Gopalakrishnan

View solution in original post

7 REPLIES 7

avatar
ppk refers to Putty's custom format. You should use the key format used by
OpenSSH. there are tools to convert between these two formats.
Alternatively, you can use the ssh-keygen tool to create a fresh pair of
keys

Regards,
Gautam Gopalakrishnan

avatar
Explorer

Hi Gautam

 

I am using a pem file but still getting the same error.

I also tried to create a open-ssh supported format by using

ssh-keygen -f my.pem -y > my.pub

Could you please help with the correct format that should be used.

 

Regards,

Harman

avatar
New Contributor

I am also facing the same problem, m trying to do this in docker containers. I also tried giving private key (id_rsa) but then my browser goes to a freezed state (Pic given below).problem1.png

It would be really helpful if any one could provide pointers.

avatar
Contributor

I'm experiencing this error as well when using the python CM API and calling the host_install command while providing the id_rsa key from the server I'm invoking the python script from.  I tried copying the id_rsa file to the CM server /root/.ssh directory as well, but that didn't help.  Where should the private key be located when referencing from the host_install command in the python CM API?

avatar
Contributor
It looks like I solved the issue - it seems the python CM API has now been changed for the host_install command. Before it was taking a file name as the private key and is now expecting it to be a string variable

avatar
Explorer
TylerHale - can you expand pls on how you passed in the private key?

I have tried:
cmd = cm.host_install(host_username, host_list, private_key="/home/ec2-user/.ssh/id_rsa", cm_repo_url=cm_repo_url)

I have also tried passing the private key as a string variable. i,e:
cmd = cm.host_install(host_username, host_list, private_key="--begin rsa--.............--end-rsa key--", cm_repo_url=cm_repo_url)

thanks

avatar
Contributor

bulmanp - The private_key parameter should be the contents of the private key file (in your case, the 2nd option should have worked).  Here is the working code I use :

 

f = open("/root/.ssh/id_rsa", "r")
id_rsa = f.read()
#print id_rsa
f.close()

#passwordless certificate login
apicommand = cm.host_install(user_name="root",
private_key=id_rsa,
host_names=hostIds,
cm_repo_url=cm_repo_url,
java_install_strategy="NONE",
unlimited_jce=True).wait()