*New 12.1 series Release:
2019-11-08: XigmaNAS - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS - released

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

SSH works with HTTPS Proxy but Doesnt with SOCKS, why?

Secure shell connections.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Posts: 1
Joined: 03 Apr 2017 17:51
Status: Offline

SSH works with HTTPS Proxy but Doesnt with SOCKS, why?


Post by firesh » 03 Apr 2017 18:03

Hi all,

I have a situation that i do not understand, i hope the SSH experts here will be able to explain to me,
on what's happening.

Here is the question:

Look at the commands below, One runs on HTTPS proxy and another one runs on SOCKS 5 proxy.
However, to reach successfully to the destination reverse SSH, only HTTPS proxy was successful
and not SOCKS, can someone explain to me why is that ?

command that works (HTTPS Proxy)

Code: Select all

ssh -vvv -o ProxyCommand='nc -x connect -X proxy.url.com:912 %h %p' -o StrictHostKeyChecking=no -f -i /mykey -R 1031:localhost:9050 -p 80 remoteuser@remoteServer.com <command>

command that doesn't work (SOCKS Proxy)

Code: Select all

ssh -vvv -o ProxyCommand='nc -x proxy.url.com:1080 %h %p' -o StrictHostKeyChecking=no -f -i /mykey -R 1031:localhost:9050 -p 80 remoteuser@remoteServer.com <command>
The error i get whenever i try with SOCKS 5 proxy is "ssh_exchange_identification: Connection closed by remote host"

List of absolute working assumptions:
- remoteuser@remoteServer.com exist and working (yes it is)
- proxy.url.com:1080 is a SOCKS 5 proxy (yes it is)
- proxy.url.com:912 is a HTTPS proxy (yes it is)
- /mykey exist with correct permissions (yes it is)
- nc -x or nc -x 5 is the same as nc defaults to SOCKS 5 by default

Post Reply

Return to “SSH”