EnglishFrenchSpanish

OnWorks favicon

sslhp - Online in the Cloud

Run sslhp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command sslhp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


sslh - Switch incoming connection between SSH and SSL/HTTPS servers

SYNOPSIS


sslh [ -v ] [ -p [host:]port ] [ -t timeout ]
[ --ssh [host:]port ] [ --ssl [host:]port ]

DESCRIPTION


sslh is a simple script that lets you switch an incoming connection on a single port
between distinct SSH and SSL/HTTPS servers.

sslh listens for connections on a port and is able to redirect them either to an HTTPS web
server or a SSH server.

This lets one setup both a HTTPS web server and a SSH server and access them through the
same host+port.

OPTIONS


The program follows the usual GNU command line syntax, with long options starting with two
dashes.

-p, --port [host:]port
The port the proxy will listen to. If no port is given, 443 is used by default. If
no host is given, "localhost" is used by default.

-s, --ssh [host:]port
The SSH server which the SSH connections must be forwarded to. If omitted, the
default is localhost:22.

-l, --ssl, --https [host:]port
The HTTPS server which the HTTPS connections must be forwarded to. If omitted, the
default is localhost:443.

-t, --timeout delay
Timeout in seconds before a silent incoming connection is considered as a SSH
connection. The number can be fractional.

The default is 2seconds.

-v, --verbose
Verbose output. This option can be used several times for more verbose output.

EXAMPLE OF USE


Is this tool actually useful? Yes.

For example one can use it to access both a SSH server and a secure web server via a
corporate proxy that only accepts to relay connections to port 443. Creating a tunnel that
passes SSH connection through a CONNECT-enabled web proxy is easy with connect-tunnel
(also included in the "Net::Proxy" distribution).

The proxy will let both SSH and HTTPS connections out (since they all point to port 443),
and the home server will connect those incoming connections to the appropriate server.
This only requires to run the HTTPS server on a non standard port (not 443).

TECHNICAL NOTE


How can this proxy find out what kind of protocol is using a TCP connection to port 443,
without being connected (yet) to the server? We actually rely on a slight difference
between the SSL and SSH protocols (found thanks to ethereal):

SSH Once the TCP connection is established, the server speaks first, presenting itself by
saying something like:

SSH-2.0-OpenSSH_3.6.1p2 Debian 1:3.6.1p2-1

SSL With SSL, it's always the client that speaks first.

This means that sslh can be used with any pair of protocols/services that share this
property (the client speaks first for one and the server speaks first for the other).

AUTHORS


Original idea and C version
Frederic Ple "<[email protected]>".

Perl versions
Philippe 'BooK' Bruhat "<[email protected]>".

SCRIPT HISTORY


Version 0.01 of the script was a quick hack designed in 2003 as a proof of concept.

Version 0.02 (and higher) are based on "Net::Proxy", and included with the "Net::Proxy"
distribution. Version 0.02 didn't work, though.

Version 0.03 correctly initialised the "in" connector.

Version 0.04 lets the proxy listen on any address (instead of "localhost", which is still
the default). Thanks to Dieter Voegtli for spotting this.

Use sslhp online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 2
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 3
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • 4
    Apache OpenOffice Extensions
    Apache OpenOffice Extensions
    The official catalog of Apache
    OpenOffice extensions. You'll find
    extensions ranging from dictionaries to
    tools to import PDF files and to connect
    with ext...
    Download Apache OpenOffice Extensions
  • 5
    MantisBT
    MantisBT
    Mantis is an easily deployable, web
    based bugtracker to aid product bug
    tracking. It requires PHP, MySQL and a
    web server. Checkout our demo and hosted
    offerin...
    Download MantisBT
  • 6
    LAN Messenger
    LAN Messenger
    LAN Messenger is a p2p chat application
    for intranet communication and does not
    require a server. A variety of handy
    features are supported including
    notificat...
    Download LAN Messenger
  • More »

Linux commands

  • 1
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 2
    abilint
    abilint
    abilint - validate an abigail ABI
    representation abilint parses the native
    XML representation of an ABI as emitted
    by abidw. Once it has parsed the XML
    represe...
    Run abilint
  • 3
    coresendmsg
    coresendmsg
    coresendmsg - send a CORE API message
    to the core-daemon daemon ...
    Run coresendmsg
  • 4
    core_server
    core_server
    core_server - The primary server for
    SpamBayes. DESCRIPTION: Currently serves
    the web interface only. Plugging in
    listeners for various protocols is TBD.
    This ...
    Run core_server
  • 5
    fwflash
    fwflash
    fwflash - program to flash image file
    to a connected NXT device ...
    Run fwflash
  • 6
    fwts-collect
    fwts-collect
    fwts-collect - collect logs for fwts
    bug reporting. ...
    Run fwts-collect
  • More »

Ad