How to run chef-client remotely (Windows to Linux)


#1

We typically run chef-client remotely from Windows to Windows, like so:

knife winrm <node> chef-client --manual-list --winrm-user <user> --winrm-password <pwd> --winrm-shell powershell

We are now running Chef on Linux RHEL servers as well, so what is the command to run chef-client remotely from Windows to Linux RHEL? I’ve been searching but have not been able to find a command.


#2

For Windows -> Linux, you will want to use knife ssh which is almost identical to knife winrm in terms of finding nodes and executing remote commands. See https://docs.chef.io/knife_ssh.html