in my ~/.ssh/config
I would like to define something like this
# myvm.hosting.com is a real existing domain
Host myvm.hosting.com
# tunnel to mysql
LocalForward 3311 localhost:3306
# example.com is a real existing domain
Host example.com
User myuser
HostName myvm.hosting.com
# example.org is a real existing domain
Host example.org
User myuser
HostName myvm.hosting.com
When I run ssh example.com
I would like to execute the port forwarding defined for the myvm.hosting.com
, but it looks like HostName
is not overriding Host
...
Ho to achive this?
PS:
Host *
is not an option cause I have many "base machines" likemyvm.hosting.com
- I would like to keep using real DNS, I don't want niknames
Thanks!