Dies ist eine alte Version des Dokuments!
SSH Reverse Tunnel
C - Client - kann beliebiger Benutzer sein
S - Server - muss unter root (weil Ports unter 1000 zugegriffen werden)
1. C:
ssh-keygen -t rsa -b 4096 cat /root/.ssh/id_rsa.pub→ Public Key in 2. nutzen
2. S
download
nano /root/.ssh/authorized_keys nano /etc/ssh/sshd_config
download
GatewayPorts yes ClientAliveInterval 60 ClientAliveCountMax 2
download
netstat -tulpn
3. C
download
ssh -p 22 -N -R 8080:localhost:8000 root@129.159.10.245
4. C
download
autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080:localhost:8000 root@129.159.10.245
download
crontab -e
download
@reboot autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080:localhost:8000 root@129.159.10.245