Risposte:
No, non è necessaria una connessione SSH per porta inoltrata, è sufficiente aggiungere ulteriori -Listruzioni:
ssh -L LPort1:RHOST1:RPORT1 -L LPORT2:RHOST2:RPORT2 me@ju.mp.ho.st
Questo può essere abbreviato ssh jump, usando "alias" jump, se imposti una sezione corrispondente nella tua in ~/.ssh/configquesto modo:
Host jump
User myUserName
Hostname ju.mp.ho.st
Port 2345
LocalForward 8080 remotewebserver:8080
LocalForward 8443 remotewebserver:8443
LocalForward 8923 remotewebserver:8923
LocalForward 8181 remotewebserver:8181
# Eliminates reconnection delay, and does not try to re-forward ports:
Host *
ControlMaster auto
ControlPath /tmp/%r@%h:%p
Ho usato questa tecnica per molti anni, sicuramente già con oltre 10 porte, ma quando ho bisogno di più porte inoltrate, utilizzo il supporto Dynamic Socks Proxy -D.
bind: Address already in use channel_setup_fwd_listener_tcpip: cannot listen to port:quindiCould not request local forwarding.Con le impostazioni Control *, queste sono sparite, grazie! PS: Ho usato molto quel flag di commento su SE, e tu sei la prima altra persona che ho visto anche usarlo.