# Can same chef-client node communicate with multiple chef-server

**URL:** <https://discourse.chef.io/t/can-same-chef-client-node-communicate-with-multiple-chef-server/7765>\
**Category:** Chef Infra (archive)\
**Created:** [February 8, 2016, 10:11pm UTC](https://discourse.chef.io/t/can-same-chef-client-node-communicate-with-multiple-chef-server/7765 "2016-02-08T22:11:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prateekarora](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@prateekarora](https://discourse.chef.io/u/prateekarora)\
**Post date:** [February 8, 2016, 10:11pm UTC](https://discourse.chef.io/t/can-same-chef-client-node-communicate-with-multiple-chef-server/7765/1 "2016-02-08T22:11:06Z")

</div>

Hi

I have a one virtual machine that already manage by some organisation  
chef-server . but i also want same node chef-client also communicate with  
my own chef-server .

so is it possible that same node can communicate with multiple chef-server  
? and if yes  
please send me the steps.

Regards  
Prateek

---

<div class="post-metadata">

**Author:** ![prateekarora](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@prateekarora](https://discourse.chef.io/u/prateekarora)\
**Post date:** [February 8, 2016, 10:23pm UTC](https://discourse.chef.io/t/can-same-chef-client-node-communicate-with-multiple-chef-server/7765/2 "2016-02-08T22:23:23Z")

</div>

Hi

I have a one virtual machine that already manage by some organisation chef-server . but i also want same node chef-client also communicate with my own chef-server .

so is it possible that same node can communicate with multiple chef-server ? and if yes  
please send me the steps.

Regards  
Prateek

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [February 9, 2016, 8:17am UTC](https://discourse.chef.io/t/can-same-chef-client-node-communicate-with-multiple-chef-server/7765/3 "2016-02-09T08:17:45Z")

</div>

Yes it is possible, there’s multiples ways to do it but it sounds highly counterproductive and dangerous.  
The aim of chef is to describe your system state, if you make a node asking 2 separate referential you can’t be sure of it’s state after a bunch of run.

First idea: create 2 ‘client.rb’, named by the target server to know who’s who. In those config files, target a separate client.pem (you can name it with `client_key` parameter).

You may use the same key on both servers but I highly discourage it as it would mean updating both server if you rotate the client key and this open the door to hard to diagnose problems, pointing to the wrong server should error out.

To avoid repeating yourself, you may use a single configuration file and use environment variables in it to point to a different server and use a specific key. Example with `knife.rb` [here](https://docs.chef.io/config_rb_knife.html#many-users-same-repo) can be adapted.

Useful doc links:  
[https://docs.chef.io/config\_rb\_client.html](https://docs.chef.io/config_rb_client.html)  
[https://docs.chef.io/config\_rb\_knife.html](https://docs.chef.io/config_rb_knife.html)
