System Administration & Network Administration
ubuntu ssh ssh-keys public-key ssh-keygen
Updated Sat, 20 Aug 2022 12:14:31 GMT

ubuntu - public-key for authentication

I have a master and slave cluster. I am setting up cloudera manager.

On the master I created a passwordless key using the following.

ssh-keygen -f id_rsa -t rsa -N '' 
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa

I then placed the key on all slaves.

   cat /tmp/ >> /root/.ssh/authorized_keys

From the master I can ssh without a password. It works great.

Now I need a public-key for authentication. What is the key? Is that I have to enter into a browers the location of the public-key for auth. When I used I got this error. But using that key allows me to ssh into any other slave without a password.

No provider available for Unknown key file
You may connect via password or public-key authentication for the user selected above.
2013-01-27 03:34:49,832  INFO [1736878096@scm-web-86:node.NodeConfiguratorService@198] Retrying configurator with id 3
2013-01-27 03:34:49,834  INFO [1736878096@scm-web-86:node.NodeConfiguratorService@179] Submitted configurator for with id 4
2013-01-27 03:34:49,836  INFO [NodeConfiguratorThread-4-4:node.NodeConfiguratorProgress@482] Transitioning from INIT (PT0.002S) to CONNECT
2013-01-27 03:34:49,837  INFO [NodeConfiguratorThread-4-4:transport.TransportImpl@152] Client identity string: SSH-2.0-SSHJ_0_8
2013-01-27 03:34:49,844  INFO [NodeConfiguratorThread-4-4:transport.TransportImpl@161] Server identity string: SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
2013-01-27 03:34:49,844  INFO [NodeConfiguratorThread-4-4:transport.KeyExchanger@195] Sending SSH_MSG_KEXINIT
2013-01-27 03:34:49,845  INFO [reader:transport.KeyExchanger@357] Received SSH_MSG_KEXINIT
2013-01-27 03:34:49,916  INFO [reader:kex.DHG14@110] Sending SSH_MSG_KEXDH_INIT
2013-01-27 03:34:49,924  INFO [reader:transport.KeyExchanger@370] Received kex followup data
2013-01-27 03:34:49,924  INFO [reader:kex.DHG14@120] Received SSH_MSG_KEXDH_REPLY
2013-01-27 03:34:49,975  INFO [reader:transport.KeyExchanger@203] Sending SSH_MSG_NEWKEYS
2013-01-27 03:34:49,975  INFO [reader:transport.KeyExchanger@385] Received SSH_MSG_NEWKEYS
2013-01-27 03:34:49,976  INFO [NodeConfiguratorThread-4-4:node.CmfSSHClient@686] Key exchange took 0.132 seconds
2013-01-27 03:34:49,976  INFO [NodeConfiguratorThread-4-4:node.NodeConfiguratorProgress@482] Transitioning from CONNECT (PT0.140S) to AUTHENTICATE
2013-01-27 03:34:49,977  WARN [NodeConfiguratorThread-4-4:node.NodeConfigurator@277] Could not authenticate to
net.schmizz.sshj.common.SSHException: No provider available for Unknown key file
        at net.schmizz.sshj.SSHClient.loadKeys(
        at com.cloudera.server.cmf.node.NodeConfigurator.connect(
        at com.cloudera.server.cmf.node.NodeConfigurator.configure(
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$
2013-01-27 03:34:49,977  INFO [NodeConfiguratorThread-4-4:node.NodeConfiguratorProgress@503] Setting AUTHENTICATE as failed and done state


ssh public key on its own does not allow you to login to any server, it is the private & public key combination (in this case, id_rsa) which allows you to authenticate(login) into a remote server using ssh. In fact from the remote client you need to specify the private key to login to the server, not the public key.

From the Cloudera Manager installation instruction -

"For authentication during the installation and upgrade procedures, you will need to either enter the password or upload a public and private key pair for the root or sudo user account."

So if this is what you are trying to achieve, you need to upload the private key too. You will most likely find it in ~/.ssh/id_rsa

Comments (2)

  • +0 – wow.....thanks soooooo much..a beer on me if I could! — Jan 27, 2013 at 05:31  
  • +0 – You are more than welcome, I'm glad I was able to help. — Jan 28, 2013 at 02:16