SSH configuration file will be `/home/bob/.ssh/config`.
```puppet
::ssh::client::config::user{'bob':
ensure=>present,
options=>{
'HashKnownHosts'=>'yes'
}
}
```
**User's home is passed to define type**
SSH configuration file will be `/var/lib/bob/.ssh/config` and puppet will
manage directory `/var/lib/bob/.ssh`.
```puppet
::ssh::client::config::user{'bob':
ensure=>present,
user_home_dir=>'/var/lib/bob',
options=>{
'HashKnownHosts'=>'yes'
}
}
```
**User's ssh directory should not be managed by the define type**
SSH configuration file will be `/var/lib/bob/.ssh/config`.
```puppet
::ssh::client::config::user{'bob':
ensure=>present,
user_home_dir=>'/var/lib/bob',
manage_user_ssh_dir=>false,
options=>{
'HashKnownHosts'=>'yes'
}
}
```
**User's ssh config is specified with an absolute path**
```puppet
::ssh::client::config::user{'bob':
ensure=>present,
target=>'/var/lib/bob/.ssh/ssh_config',
options=>{
'HashKnownHosts'=>'yes'
}
}
```
### Server only
Host keys will be collected for client distribution unless
`storeconfigs_enabled` is `false`
```
include ssh::server
```
or
```
class { 'ssh::server':
storeconfigs_enabled => false,
options => {
'Match User www-data' => {
'ChrootDirectory' => '%h',
'ForceCommand' => 'internal-sftp',
'PasswordAuthentication' => 'yes',
'AllowTcpForwarding' => 'no',
'X11Forwarding' => 'no',
},
'PasswordAuthentication' => 'no',
'PermitRootLogin' => 'no',
'Port' => [22, 2222],
},
}
```
### Validate config before replacing it
`validate_sshd_file` allows you to run `/usr/sbin/sshd -tf` against the sshd config file before it gets replaced, and will raise an error if the config is incorrect.