I'd like to be able to modify ssh_config aliases based on my current IP address.
I have a laptop which I carry around from network to network, and a camera which I do the same with. I have setup the dhcp on these networks to always give the camera the same IP address, and I calculate what it should be in my bashrc and put the camera IP into an environment variable.
Is there any way to do something like the following inside ~/.ssh/config:
Host camera HostName $CAMERA_IP User camuser
The above doesn't work as ssh complains:
ssh: Could not resolve hostname $CAMERA_IP: Name or service not known