Outils pour utilisateurs

Outils du site


tech:tunnel_ssh_over_https

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:tunnel_ssh_over_https [2025/11/11 17:04] Jean-Baptistetech:tunnel_ssh_over_https [2026/05/30 21:44] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>SSH Web TLS}}
 +
 +# Tunnel SSH over HTTPS
 +
 +
 +Voir [[Notes socat|socat]]
 +
 +corkscrew 
 +
 +http://olivier.cochard.me/bidouillage/comment-surfer-tranquille-au-bureau
 +
 +https://gist.github.com/fnando/1101211
 +
 +https://coolaj86.com/articles/adventures-in-haproxy-tcp-tls-https-ssh-openvpn/
 +
 +http://wiki.gromez.fr/linux/howto/ssh_over_proxy
 +
 +https://wiki.archlinux.org/index.php/HTTP_tunneling
 +
 +http://www.ubuntugeek.com/how-to-use-ssh-via-http-proxy-using-corkscrew-in-ubuntu.html
 +
 +http://daniel.haxx.se/docs/sshproxy.html
 +
 +http://www.mtu.net/~engstrom/ssh-proxy.php
 +
 +## SSLH
 +
 +Voir 
 +* http://william.shallum.net/random-notes/sslh-configuring-logging-logrotate-and-logwatch
 +
 +
 +~~~bash
 +apt-get install sslh
 +~~~
 +
 +Nous configurons notre serveur web en HTTPS, mais au lieu d'utiliser le port 443 ici nous allons utiliser le port 444.
 +
 +Puis nous configurons SSLH pour écouter sur le port 443 et si HTTPS se connecter sur 127.0.0.1:444
 +
 +`/etc/default/sslh`
 +~~~bash
 +#DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 --pidfile /var/run/sslh/sslh.pid"
 +DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:7001 --ssl 127.0.0.1:444 --pidfile /var/run/sslh/sslh.pid
 +~~~
 +
 +~~~bash
 +service nginx rstart
 +service sslh restart
 +~~~
 +
 +à présent on peux serfer sur https://www.acme.fr
 +et aussi se connecter en ssh via `ssh www.acme.fr -p 443`
 +
 +Add the following to your fail2ban jail.conf
 +In Debian you'd append it to /etc/fail2ban/jail.local
 +`/etc/fail2ban/jail.local`
 +~~~ini
 +[sslh-ssh]
 +enabled = true
 +filter = sslh-ssh
 +action = iptables-multiport[name=sslh,port="443"]
 +logpath = /var/log/messages
 +maxretry = 5
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki