sslh

Sslh is a program that allows you to run several programs on port 443. Mainly it allows your SSH server and web server to share the same port.

Using SSH can be a violation of your corporate internet use policy. Please act responsibly. In particular, never ever create a reverse tunnel from your company network. Also this tool is not disguising SHH traffic as web but simply changing the port and can be easily detected by your network administrator.

Configure
Sslh has several modes of operation. In this tutorial, we will use transparent mode without forks.

OpenSSH
We will start by configuring OpenSSH to listen on a second port. We do that by modifying  You can now restart your SSH server.

Nginx
Now we will need to free port 443 so that it can be used by sslh. Edit file  and change the port for IPV4 Do not restart Nginx yet.

Routing
Create file

Make it executable

then create file

enable it using

and finally start it

Sslh
Edit file  and change   to. Here is the file after modification Next edit file /etc/default/sslh Change done from the default are
 * Activate the daemon
 * Use the no-fork version
 * Don't resolve domain name of connecting ip in logs. This allow to not loose time doing a DNS lookup for each new client
 * SSH and webserver will see connection as if it where coming directly from them. In particular, you will get the correct connecting IP address in the logs.
 * IP and port sslh listen to
 * IP and port of Nginx
 * IP and port of OpenSSH

Start
You can now restart Nginx and start sslh