Bug 1201398

Summary: ssh_config Host match name resolution
Product: Red Hat Enterprise Linux 6 Reporter: Pat Riehecky <riehecky>
Component: opensshAssignee: Jakub Jelen <jjelen>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: csieh, jjelen, misterbonnie
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-25 11:58:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pat Riehecky 2015-03-12 16:09:32 UTC
Description of problem:
When an IP range is set within the ssh_config the remote host is not checked against the IP range.

Version-Release number of selected component (if applicable):openssh-clients-5.3p1-104.el6_6.1.x86_64


How reproducible:100%


Steps to Reproduce:
1. create a host.example.com with an address on 192.168.1.10
2. add the following text to your /etc/ssh/ssh_config file, above the Host * settings

Host 192.168.1.*
 PasswordAuthentication no
 RSAAuthentication no

3. ssh 192.168.1.10, no password or RSA auth used
4. ssh host.example.com, password and RSA auth accepted

Actual results:
The same IP address has different ssh client settings

Expected results:
Since ssh is connecting to an IP address with specified config options, it should consult them.

Additional info:
The expected behavior may be a bit unclear for if there are custom settings for both the name and the address.....

Comment 2 Jakub Jelen 2015-03-13 06:42:32 UTC
    Thank you for taking the time to enter a bug report with us. We appreciate the feedback and look to use reports such as this to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to  guarantee the timeliness or suitability of a resolution.

    If this issue is critical or in any way time sensitive, please raise a ticket through your regular Red Hat support channels to make certain  it receives the proper attention and prioritization to assure a timely resolution. 

    For information on how to contact the Red Hat production support team, please visit:

    http://www.redhat.com/en/services/support#howto



From my point of view, it is clearly stated in man ssh_config, that:
> [...] The host is the hostname argument given on the command line (i.e. the name is not converted to a canonicalized host name before matching).
If you feel it is wrong, feel free to consult it with Support.