Difference between revisions of "Connecting to SSH server listening on port 443 using HTTP proxy server with HTTP CONNECT"

From Notes_Wiki
m
m
Line 15: Line 15:




Apart from corkscrew '<tt>proxytunnel</tt>' application which is available via apt in Ubuntu can also be used as follows:
Apart from corkscrew '<tt>proxytunnel</tt>' application which is available via apt in Ubuntu can also be used as follows.  '''Same is also available via dnf in CentOS Stream 8''':
<pre>
<pre>
Host &lt;special-ssh-destination&gt;
Host &lt;special-ssh-destination&gt;

Revision as of 06:16, 20 June 2022

<yambe:breadcrumb self="Connecting to SSH server listening on port 443 using HTTP proxy server with HTTP CONNECT">Corkscrew|Corkscrew</yambe:breadcrumb>

Connecting to SSH server listening on port 443 using HTTP proxy server with HTTP CONNECT

To connect to SSH server using http proxy server using HTTP connect use following steps:

  1. Download corkscrew source from http://www.agroman.net/corkscrew/ and install it using './configure; make; sudo make install'
  2. Add configuration lines similar to following in '/etc/ssh/ssh_config' file
    Host *
    ProxyCommand corkscrew <proxy-server> <proxy-port> %h %p
    Replace * with appropriate host, if corkscrew should be used only for a specific destination

Note that the above steps will work only if the given HTTP proxy server accepts HTTP CONNECT requests for all ports. Default configuration of many HTTP proxy servers is to allow CONNECT only for HTTPS ports such as 443 or 8443. In case such a restrictive proxy server is in use then SSH server can be configured to also listen on port 443, provided there is no HTTPS server running on destination


Apart from corkscrew 'proxytunnel' application which is available via apt in Ubuntu can also be used as follows. Same is also available via dnf in CentOS Stream 8:

Host <special-ssh-destination>
   ProxyCommand proxytunnel -p <proxy-IP>:<Proxy-port> -P <username>:<password> -d <ssh-destination-IP>:<ssh-port>
   ServerAliveInterval 60
   GSSAPIAuthentication no


<yambe:breadcrumb self="Connecting to SSH server listening on port 443 using HTTP proxy server with HTTP CONNECT">Corkscrew|Corkscrew</yambe:breadcrumb>