Class | Net::SSH::Config |
In: |
lib/net/ssh/config.rb
|
Parent: | Object |
The Net::SSH::Config class is used to parse OpenSSH configuration files, and translates that syntax into the configuration syntax that Net::SSH understands. This lets Net::SSH scripts read their configuration (to some extent) from OpenSSH configuration files (~/.ssh/config, /etc/ssh_config, and so forth).
Only a subset of OpenSSH configuration options are understood:
Note that you will never need to use this class directly—you can control whether the OpenSSH configuration files are read by passing the :config option to Net::SSH.start. (They are, by default.)
Loads the configuration data for the given host from all of the given files (defaulting to the list of files returned by default_files), translates the resulting hash into the options recognized by Net::SSH, and returns them.
Load the OpenSSH configuration settings in the given file for the given host. If settings is given, the options are merged into that hash, with existing values taking precedence over newly parsed ones. Returns a hash containing the OpenSSH options. (See translate for how to convert the OpenSSH options into Net::SSH options.)