Celeb Glow
news | March 19, 2026

How to test ssh socks by curl

Here are the steps that I did so far, and I adapted these steps to use on localhost to make debugging easier.

I have a user that have ssh access to localhost. So I run this:

ssh -D 7070 mysshuser@127.0.0.1

To test this I am using curl. So in another terminal (where I am connected with my regular user account not the ssh user account) tab I am running this:

curl -v --max-time 10 --proxy 127.0.0.1:7070 

In the command output I can see that the connection to the port 7070 was successful. However the page is not rendered (empty reply from server):

* Rebuilt URL to:
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 7070 (#0)
> GET HTTP/1.1
> Host:
> User-Agent: curl/7.47.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
curl: (52) Empty reply from server

Thank you

5

1 Answer

I found out that the option of curl that should be used is socks5 instead of proxy. So this works like a charm:

curl -v --max-time 10 --socks5 127.0.0.1:7070 

But I am still waiting for other feedback.

thanks

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy