I have a couple of hosts configured in ~/.ssh/config, for example:
Host SomeHost
Hostname 10.0.0.3
User SomeUser
I'm trying to get the hostname part (10.0.0.3) as a variable from inside a shell script (the %h variable). Is it somehow possible?
sshreads it when executed, andsshdoesn't provide an API for querying configurations.