SSH exec usage example #2
-
Hey there. Thanks for this plugin. I'm attempting to use this plugin for an Would you be able to provide an example of what settings I should use in the SSH Exec if I'm trying to get TeamCity to run an SSH command on a remote host, proxied through a different remote host? I'm mostly unsure of what I should put in the Deployment Target section for I've tried: Target: %sshTunnel.<sanitized_name>.remote.address% But no luck. I have confirmed access from the proxy works as expected. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You are aware that |
Beta Was this translation helpful? Give feedback.
-
Yes, of course. I removed the name I have there, as it's irrelevant. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed explanation, this is helpful. I tested and it does work. I never thought to use |
Beta Was this translation helpful? Give feedback.
Ok, just wanted to rule out the obvious first. :-)
So, to be able to answer reliably I would need more information about your config.
But I just try to guess your setup.
It is like this I guess?
In that case you would configure the SSH tunnel build feature like
And the SSH Exec build step like
If you could use the
remote.address
andremote.port
directly, you wouldn't need an SSH tunnel through the proxy, that's the whole point of an SSH tunnel.You connect to the
local.address
andlocal.port
, the SSH client that is listening there, forwards the connection via the SSH connection to proxy and connects toremote.address
andremote.port
from there as proxy is allowed to connect to target w…