Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: aefc66dba3
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (25 sloc) 1.357 kb

ssh_known_hosts2: enhanced functionality for editing SSH's known_hosts files

This cookbook currently provides a single provider: ssh_known_hosts2_edit which edits, and does not template a known_hosts file. It does this by organizing the file into memory and overwriting it in a consistent way, but preserves all data in the file that already existed.

Provider Information

Actions: modify and delete do pretty much what you think they do.


  • host: name attribute. can be a String or an Array of hosts you'd like to associate with this key.
  • key: the string content of the host key. required.
  • filename: The filename you wish to edit. The default is /root/.ssh/known_hosts.
  • owner: the owner of the file. be sure to pair this with group and filename.
  • group: the group of the file.


  • Fork the project
  • Make your edits
  • Be sure to not change anything in metadata.rb without prior permission.
  • Send a pull request.


Erik Hollensbe

Jump to Line
Something went wrong with that request. Please try again.