I want to determine the target address of an SSH connection with a function call that generate the address to connect to. All of the examples using
ProxyCommand that I can find online use the
-W flag to hop to a second machine. I tried that with
localhost for the second machine, and that worked but required SSH authentication twice which I didn't like.
I am trying to call
ssh inside of the
ProxyCommand without forwarding to second hop. Right now, I have in my
Host test ProxyCommand ssh user@address
When I do
ssh test, it seems to connect okay but after connecting there is a blank prompt that does not respond to input, so it seems stdin/stdout must not be directed properly.