Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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. :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.