1

To set a default user for each ssh connection, I would normally adjust my .ssh/config file to

Host *.server1.com
User joe

Host *.server2.com
User mike

I am now using Chef. The knife tool does not read from .ssh/config. So how can I set default usernames based on host?

One solution I do NOT want is to create a default "chef" user with full admin rights on every server and then use that user for batch server processes. There are many reasons I am hoping for a more optimal answer.

csi
  • 1,555
  • 7
  • 23
  • 42

1 Answers1

0

So this feature doesn't exist yet in Chef - I'd encourage you to upvote and watch the ticket over here: https://tickets.opscode.com/browse/CHEF-4538

Potentially, you could grab the code change, and use it as a knife plugin, but that might be a little more monkeypatching code you'd want to do. :)

Mike Fiedler
  • 2,162
  • 1
  • 17
  • 34