cURL to remote server through SSH tunnel
<p>I have to write a PHP script that will be executed on my client's network when finalized. My computer (A) cannot connect to that network, but I have SSH access to a single server (B) on it.
My script has to do a cURL request (with certificate and private key) to a web server (C) on a specific port on that network. Another difficulty is that I do not have the IP of the C server, only a URL resolvable only when within the network. But server B and C can communicate between each other</p>

<p>Basically I see 3 steps (but there may be more) :</p>

<ol>
<li>Open SSH connection from computer A to server B</li>
<li>Send cURL request to server C (<a href="https://my.remote.server.domain.com:8444" rel="nofollow">https://my.remote.server.domain.com:8444</a>) and store response</li>
<li>Close SSH connection</li>
</ol>

<p>The thing is, I have no idea how to do that (I'm basically ignorant in all things network related). Anyone has a clue ?</p>