Is it possible to establish ssh connection through proxy using php?
My php code is
$connection = ssh2_connect('x.x.x.x');
But it gives an error below
PHP Warning: ssh2_connect(): Unable to connect to x.x.x.x
I can't establish ssh connection via command line too.
ssh root@x.x.x.x
Solution (FAIL)
Then I found solution. I created **~/.ssh/config**
file and added Proxy definitions to it.
Host x.x.x.x
Hostname x.x.x.x
User root
ProxyCommand /usr/bin/corkscrew proxy.somewebsite.com 10080 %h %p
After that I was able to connect to ssh via command line :)
But I can't still connect with php code. I still get the same error :(
Problem here is that ssh2_connection
function doesn't using ssh config file. Is there a way to tell the function to use it?