Skip to content

Commit

Permalink
Fix README formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Sep 23, 2013
1 parent 749dcc2 commit 94abfd1
Showing 1 changed file with 25 additions and 33 deletions.
58 changes: 25 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,14 @@ The attributes list is dynamically generated, and lines up with the default open

This means anything located in [sshd_config](http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5) or [ssh_config](http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5) can be used in your node attributes.

* If the option can be entered more then once, use an _Array_,
otherwise, use a _String_. If the option is host-specific use a
`Hash` (please see below for more details).
* If the option can be entered more then once, use an _Array_, otherwise, use a _String_. If the option is host-specific use a `Hash` (please see below for more details).
* Each attribute is stored as ruby case, and converted to camel case for the config file on the fly.
* The current default attributes match the stock `ssh_config` and `sshd_config` provided by openssh.
* The namespace for `sshd_config` is `node['openssh']['server']`.
* Likewise, the namespace for `ssh_config` is `node['openssh']['client']`.
* An attribute can be an `Array`, a `Hash` or a `String`.
* If it is an `Array`, each item in the array will get it's own line
in the config file.
* `Hash` attributes are meant to used with `ssh_config` namespace to
create host-specific configurations. The keys of the `Hash` will be
used as the `Host` entries and their associated entries as the
configuration values.
* If it is an `Array`, each item in the array will get it's own line in the config file.
* `Hash` attributes are meant to used with `ssh_config` namespace to create host-specific configurations. The keys of the `Hash` will be used as the `Host` entries and their associated entries as the configuration values.
* All the values in openssh are commented out in the `attributes/default.rb` file for a base starting point.


Expand Down Expand Up @@ -106,35 +100,33 @@ Not to be used with `node['openssh']['listen_interfaces']`.
```

### Host-specific configurations with hashes.
You can use a `Hash` with `node['openssh']['client']` to configure
different values for different hosts.
You can use a `Hash` with `node['openssh']['client']` to configure different values for different hosts.

```json
"client": {
"*": {
"g_s_s_a_p_i_authentication": "yes",
"send_env": "LANG LC_*",
"hash_known_hosts": "yes"
},
"localhost": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
},
"127.0.0.1": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
},
"other*": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
}
},
"client": {
"*": {
"g_s_s_a_p_i_authentication": "yes",
"send_env": "LANG LC_*",
"hash_known_hosts": "yes"
},
"localhost": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
},
"127.0.0.1": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
},
"other*": {
"user_known_hosts_file": "/dev/null",
"strict_host_key_checking": "no"
}
}
```

The keys are used as values with the `Host` entries. So, the
configuration fragment shown above generates:
The keys are used as values with the `Host` entries. So, the configuration fragment shown above generates:

```json
```text
Host *
SendEnv LANG LC_*
HashKnownHosts yes
Expand Down

0 comments on commit 94abfd1

Please sign in to comment.