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

From Notes_Wiki
Revision as of 08:01, 22 January 2019 by Saurabh (talk | contribs)

<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:

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>