Why would ssh fail to expand %h variable in .ssh/config?

Posted by Zoran on Super User See other posts from Super User or by Zoran
Published on 2012-09-26T01:03:46Z Indexed on 2012/09/26 3:40 UTC
Read the original article Hit count: 507

Filed under:
|
|
|

Why would ssh fail to expand %h from .ssh/config? This used to work and still works except on a RHEL box. Looking for what the origin of this could be. Is there a setting somewhere that tells ssh to not expand %h?

I have something like this in my .ssh/config:

Host *.foo
  HostName %h.mydomain.com

On the RHEL box where this doesn't work, I get this:

$ ssh -vvvv bar.foo
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /home/zsimic/.ssh/config
debug1: Applying options for *.foo
debug1: Applying options for *.foo
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname %h.mydomain.com: Name or service not known

© Super User or respective owner

Related posts about ssh

Related posts about redhat