Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:users:jcmvbkbc:ssh-over-http-proxy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
etc:users:jcmvbkbc:ssh-over-http-proxy [2009/10/13 09:14] – создано jcmvbkbcetc:users:jcmvbkbc:ssh-over-http-proxy [2016/08/08 20:53] (current) – ↷ Page moved from users:jcmvbkbc:ssh-over-http-proxy to etc:users:jcmvbkbc:ssh-over-http-proxy kel
Line 5: Line 5:
 ===== Symptoms ===== ===== Symptoms =====
 SSH client establishes TCP connection, but after a while disconnects with message "ssh_exchange_identification: Connection closed by remote host". SSH server at the same time receive no connection attempt at all. SSH client establishes TCP connection, but after a while disconnects with message "ssh_exchange_identification: Connection closed by remote host". SSH server at the same time receive no connection attempt at all.
 +
  
 ===== Analysis ===== ===== Analysis =====
-It's been discovered that HTTP proxy may not establish outbound connection unless it receive two lines of text closed by '\n'. Furthermore, even provided these two lines from client, it sometimes it doesn't send SSH server reply back, unless it has two leading text lines closed by '\n'.+It's been discovered that HTTP proxy may not establish outbound connection unless it receive two lines of text closed by '\n'. Furthermore, even provided these two lines from client, sometimes it doesn't send SSH server reply back, unless it has two leading text lines closed by '\n'. 
  
 ===== Solution ===== ===== Solution =====
-We need to push two lines of text at the beginning of SSH client connection, throw them away (as they don'confirm SSH protocol) at the SSH server side, and push two lines of text before SSH server reply (which is acceptable by SSH protocol, if these lines don't start with 'SSH-').+We need to push two lines of text at the beginning of SSH client connection, throw them away (as they don'conform SSH protocol) at the SSH server side, and push two lines of text before SSH server reply (which is acceptable by SSH protocol, if these lines don't start with 'SSH-').
  
 ===== Implementation ===== ===== Implementation =====
Line 39: Line 41:
 EOF EOF
  
-head -n2 >/dev/null+read 
 +read
 nc 127.0.0.1 22 nc 127.0.0.1 22
 </file> </file>
etc/users/jcmvbkbc/ssh-over-http-proxy.1255410846.txt.gz · Last modified: 2009/10/13 09:14 by jcmvbkbc