refactor: improve SSH local port forwarding script

refactor: improve SSH tunnel helper

- make SSH tunnel configuration explicit
- validate DDNS resolution
- validate SSH private key
- improve quoting and shell safety
- add descriptive status output
- document local and remote forwarding endpoints
- preserve background SSH forwarding behavior
This commit is contained in:
Lucas Vivohost committed 2026-09-14 12:44:39 +02:00
1 parent f313e9edfa
commit daf0457175
2 files changed
+5 -2

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
ssh -o ExitOnForwardFailure=yes -fNL 127.0.0.2:58846:localhost:58846 \
lucas@$(dig +short someoneslinux.ddns.net @resolver1.opendns.com) \
-p 3032 \
-i /home/lucas/.ssh/id_rsa