Tunneling SSH through HTTP proxies using HTTP Connect - ParabolaWiki

# Tunneling SSH through HTTP proxies using HTTP Connect

# Introduction

To open the connection to the server running the SSH daemon we will use the HTTP CONNECT method which allows a client to connect to a server through a proxy by sending an HTTP CONNECT request to this proxy.

Tip: If your proxy does not support the HTTP Connect method, see HTTP Tunneling

# Creating the tunnel

For this we will use corkscrew, available in [community], which is «a tool for tunneling SSH through HTTP proxies».

Opening an SSH connection is pretty simple:

    ssh user@server -o "ProxyCommand corkscrew $proxy_ip_or_domain_name $proxy_port $destination_ip_or_domain_name $destination_port"

but that just opens a shell yet what we want is a tunnel, so we do this:

    ssh -ND $port user@server -o "ProxyCommand corkscrew $proxy_ip_or_domain_name $proxy_port $destination_ip_or_domain_name $destination_port"

which creates a SOCKS proxy on localhost:$port.

# Using the tunnel

See Using a SOCKS proxy.

# See Also

- community/httptunnel

## Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.
Category:

- Secure Shell