RexOps / RexOps/Rex

Reading OpenSSH ~/.ssh/config file ignores all hosts options

Open
#1,209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
737
Forks
214
PR merge metrics
No merged PRs in 30d

Description

When Rex::Config parses ~/.ssh/config it slurps options for named servers, but not for the all hosts "*" option. This means that it is not possible to set a configuration value for all hosts in the config file, and instead Rex sets its default. (In my case, I was trying to specify a default timeout value).

I've worked around this by adding the following in my Rexfile: Rex::Config->set_timeout(20); but I wanted to note it here for the record.

It doesn't look like an easy fix unfortunately, as each configuration option is taken from a hash for the host in question.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Rex::Config's parser for ~/.ssh/config and trace how options are selected for a named host. Confirm that values under the '*' host are included in the effective configuration, including the timeout example, and verify the behavior against a representative SSH config.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.