How to bootstrap to Centos Node


I’m using centos7, I setup a VM with port forwarding configurations as attached in the screenshot.

I’m trying to bootstrap to a node with the ip which is using the port number as 2233 and Ip# port# 9999. Can anyone help me to right command to bootstrap to these two nodes.

Here’s what I tried:
[root@chefworkstation ~]# knife bootstrap --ssh-user admin --ssh-password password --ssh-port 2233 -N webserver

WARNING: No knife configuration file found
WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem>
ERROR: Your private key could not be loaded from /etc/chef/client.pem
Check your configuration file and ensure that your private key is readable


It doesn’t look like you have a client.rb or config.rb set up on your workstation that includes to your credentials to your Chef Server. You may have missed some steps. I’d recommend starting with the tutorial: