I'm trying to understand why SSH proxycommand isn't working. I have a SSH config file in a custom location as below.
vagrant@ansible:~$ cat ~/.ssh/cml-config
Host mgmt-lxc
HostName 10.17.238.146
IdentityFile ~/.ssh/id_rsa
User Rod
Host 10.255.0.*
ProxyCommand ssh -W %h:%p mgmt-lxc
vagrant@ansible:~$
I can SSH to the jumphost and from there to another device.
vagrant@ansible:~$ ssh -F ~/.ssh/cml-config mgmt-lxc
Rod@mgmt-8Fe5bN$ ssh [email protected]
Warning: Permanently added '10.255.0.47' (RSA) to the list of known hosts.
,,,,,
/'''\
( o o )
-oOOO--(_)--OOOo-------------------------------------------
Router: Core-1
Secured system for authorized users only.
.oooO Unauthorized access is strictly prohibited.
( ) Oooo. All activities may be logged and monitored.
---\ (----( )--------------------------------------------
\_) ) /
(_/
Password:
However when I attempt to SSH directly to 10.255.0.47 using the custom SSH key I get an error.
vagrant@ansible:~$ ssh -F ~/.ssh/cml-config [email protected]
ssh: Could not resolve hostname mgmt-lxc: Name or service not known
ssh_exchange_identification: Connection closed by remote host
vagrant@ansible:~$
I'm running Ubuntu Xenial64.