0

I'd like to understand the mechanism of HTTP tunneling better:

  • So I've got a corporate HTTP Proxy that supports HTTP CONNECT method.
  • I configure something like corkscrew to tunnel SSH over HTTP
  • Which means that when corkscrew sends HTTP traffic to the Web Proxy the latter will issue an HTTP CONNECT to the target server

Question: While I'm connecting to SSH Server, how does it understand the initial HTTP CONNECT from the Web Proxy to confirm the connection? After all it's HTTP, not SSH.

1 Answers1

0

sshd only uses the ssh protocol (most of the time). In your scenario, sshd is speaking ssh, there's no HTTP being sent to it. The whole point of corkscrew is to tunnel the ssh protocol over HTTP.

Ryan Babchishin
  • 6,260
  • 2
  • 17
  • 37
  • But at what protocol does Web Proxy talk to sshd when `CONNECT` is issued? I'm asking only about the initial request to establish the connection. – Stanislav Bashkyrtsev Aug 28 '16 at 12:47
  • It would be *speaking* the ssh protocol, using a normal TCP connection like any other protocol. What else could it use? – Ryan Babchishin Aug 28 '16 at 13:45
  • The sshd service requires no modification for corkscrew to work. So it's just a plain old ssh server, using tcp and speaking the ssh protocol. (according to the docs). I took a look at the source and I have no idea how that actually works though :(. – Ryan Babchishin Aug 28 '16 at 14:01