Forem

abdennour
abdennour

Posted on

3

SSH over HTTP Proxy

story

nc -X connect is the popular way to communicate with SSH over proxy. However, it's broken when your client is MacOS.

solution

Install corkscrew

brew install corkscrew
Enter fullscreen mode Exit fullscreen mode

SSH now:

ssh -4 \
  -o "ProxyCommand corkscrew ip.http.proxy port-http-proxy %h %p" \
  user@ip-machine-in-other-network
Enter fullscreen mode Exit fullscreen mode

.i.e: in following example my HTTP_PROXY is 192.168.1.15:3128. And i want to login into 10.11.6.23

ssh -4 \
  -o "ProxyCommand corkscrew 192.168.1.15 3128 %h %p" \
  user@10.11.6.23
Enter fullscreen mode Exit fullscreen mode

Note : -4 is to force ipv4 over other options (ipv6)

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay