How To Install sslh on CentOS 7

In this tutorial we learn how to install sslh on CentOS 7. sslh is Applicative protocol(SSL/SSH) multiplexer

Introduction

In this tutorial we learn how to install sslh on CentOS 7.

What is sslh

sslh accepts connections on specified ports, and forwards them further based on tests performed on the first data packet sent by the remote client. Probes for HTTP, SSL, SSH, OpenVPN, tinc, XMPP are implemented, and any other protocol that can be tested using a regular expression, can be recognized. A typical use case is to allow serving several services on port 443 (e.g. to connect to ssh from inside a corporate firewall, which almost never block port 443) while still serving HTTPS on that port. Hence sslh acts as a protocol multiplexer, or a switchboard. Its name comes from its original function to serve SSH and HTTPS on the same port.

We can use yum or dnf to install sslh on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install sslh.

Install sslh on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install sslh using yum by running the following command:

sudo yum -y install sslh

Install sslh on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install sslh using dnf by running the following command:

sudo dnf -y install sslh

How To Uninstall sslh on CentOS 7

To uninstall only the sslh package we can use the following command:

sudo dnf remove sslh

References

Summary

In this tutorial we learn how to install sslh on CentOS 7 using yum and dnf.