Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Created January 11, 2024 02:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilangvperdana/e2ab9f05fcb89ff843ae41fb937e7c83 to your computer and use it in GitHub Desktop.
Save gilangvperdana/e2ab9f05fcb89ff843ae41fb937e7c83 to your computer and use it in GitHub Desktop.
Install STUNNEL for SSH over HTTPS

General

This is workaround for install stunnel4 (SSH over HTTPS)

Command

apt install -y stunnel4

cd /etc/stunnel/
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -sha256  -subj '/CN=127.0.0.1/O=localhost/C=US'  -keyout /etc/stunnel/stunnel.pem  -out /etc/stunnel/stunnel.pem

nano /etc/stunnel/stunnel.conf
pid = /var/run/stunnel4/stunnel.pid
cert = /etc/stunnel/stunnel.pem

[ssh]
accept = 172.29.161.228:443
connect = 127.0.0.1:55

systemctl restart stunnel4

nano /etc/services
# https 443/tcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment