Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
| ssh:ssh_reverse_tunnel [2024/11/27 20:27] – nik | ssh:ssh_reverse_tunnel [2024/11/27 20:27] (aktuell) – nik | ||
|---|---|---|---|
| Zeile 12: | Zeile 12: | ||
| 2. S | 2. S | ||
| - | < | + | < |
| nano / | nano / | ||
| nano / | nano / | ||
| </ | </ | ||
| - | < | + | < |
| GatewayPorts yes | GatewayPorts yes | ||
| ClientAliveInterval 60 | ClientAliveInterval 60 | ||
| Zeile 22: | Zeile 22: | ||
| </ | </ | ||
| - | < | + | < |
| netstat -tulpn | netstat -tulpn | ||
| </ | </ | ||
| Zeile 28: | Zeile 28: | ||
| 3. C | 3. C | ||
| - | < | + | < |
| ssh -p 22 -N -R 8080: | ssh -p 22 -N -R 8080: | ||
| </ | </ | ||
| Zeile 35: | Zeile 35: | ||
| 4. C | 4. C | ||
| - | < | + | < |
| autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080: | autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080: | ||
| </ | </ | ||
| ->ggfs. mit ps aux | grep ssh die PID suchen und mit kill PID wieder killen | ->ggfs. mit ps aux | grep ssh die PID suchen und mit kill PID wieder killen | ||
| - | < | + | < |
| crontab -e | crontab -e | ||
| </ | </ | ||
| - | < | + | < |
| @reboot autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080: | @reboot autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -p 22 -N -R 8080: | ||
| </ | </ | ||