Knife ssh passwordless authentication


#1

How can we use password-less authentication with knife ssh??


#2

The docs /tutorials for chef how to use “—identity-file” argument to pass a path to a private key.

https://docs.chef.io/knife_ssh.html


#3

will it be just -i or -identity??

and what should be specified after -i option?? what will be the content of this file??


#4

can you please share exact command we need to write


#5

Priyanshu,
does your server have ssh key based authentication enabled?
Is your key in the authorized keys for that sever?
Do you have the corresponding private key?
For me, this is an example of a knife ssh command that runs the client on an already bootstrapped node registered in the role of a web on Oracle Cloud Infrastructure. (oci)
knife ssh ‘role:web’ ‘sudo chef-client’ --ssh-user opc --identity-file /home/opc/learn-chef/.chef/TFKeyTest.pem --attribute ipaddress

TFKeyTest.pem is a private key. You can google to read about how public/private keys work for passwordless authentication.

priyanshu
December 5 |

can you please share exact command we need to write

Visit Topic or reply to this email to respond.

In Reply To

jobmiller
December 4 |

The docs /tutorials for chef how to use “—identity-file” argument to pass a path to a private key. https://docs.chef.io/knife_ssh.html
Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.