In order to access a certain machine I need to get through a proxy and then via a jumphost, before I'm at the desired location.
For this I'm using a config file like this:
### jumphost
Host jmp
HostName xxx.xxx.xxx.xxx:port
User user
ProxyCommand corkscrew proxy.name.com port %h %p
### box
Host box
HostName xxx.xxx.xxx.xxx
User user
ProxyCommand ssh mgmtbox netcat -w 120 %h %p
This works perfectly fine as long as the config file is in its set location. However, if I want to specify this config file with the -F flag ("ssh -F configfile box"), I get the following error:
ssh: Could not resolve hostname jmp: Name or service not known
The problem starts only with the second host. If I use "ssh -F configfile jmp" the command works fine.
I'm a bit lost here, since the config file works perfectly fine until it is used via the -F flag. Any ideas?