IT-Sheriff
IT-Sheriff

Reputation: 164

Run "sudo chef-client" from workstation

I am trying to figure out a way by which I can run "sudo chef-client" from my workstation. I tried following way but failed.

C:\Users\Administrator\chef-repo>knife ssh name:node1 -a hostname -x windows -i knife.pem "sudo chef-client"

FATAL: 1 node found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute.”

Any guidance?

Upvotes: 0

Views: 1072

Answers (1)

coderanger
coderanger

Reputation: 54181

Your node doesn't have a hostname attribute set. Try -a ipaddress instead to use the default IP address on the machine.

For posterity, based on comments below the user was unclear that Windows hosts don't generally run SSH daemons and thus knife ssh cannot be used. knife winrm is the recommended option for Windows nodes.

Upvotes: 0

Related Questions