Bien sûr, man ssh:
man ssh a dit:
-L [bind_address:]port:host:hostport
Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. This
works by allocating a socket to listen to port on the local side, optionally bound to the specified bind_address. Whenever a
connection is made to this port, the connection is forwarded over the secure channel, and a connection is made to host port
hostport from the remote machine. Port forwardings can also be specified in the configuration file. IPv6 addresses can be spec-
ified with an alternative syntax: [bind_address/]port/host/hostport or by enclosing the address in square brackets. Only the
superuser can forward privileged ports. By default, the local port is bound in accordance with the GatewayPorts setting. How-
ever, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of ``localhost'' indi-
cates that the listening port be bound for local use only, while an empty address or `*' indicates that the port should be avail-
able from all interfaces.
Exemple avec RDP (port tcp/3389), VNC est plus "complexe" à cause des sessions (le fameux :1 dont ghost parle).
Tu as au boulot deux machines.
Une où seul ssh (port tcp/22) incoming est autorisé à partir d'internet (0.0.0.0/0) : ssh.phoenix.be. Une où seul rdp (port tcp/3389) incoming est autorisé à partir du LAN: rdp.phoenix.be. La machine ssh est la seule à avoir une IP publique sur Internet. Les deux machines ont une IP privée dans un LAN arbitraire.
Tu ne peux donc pas te connecter de chez toi directement à rdp.phoenix.be.
Tu fais donc un tunnel ssh depuis ta machine, port local arbitraire (disons 12345), vers remotehost:remoteport (donc dans notre cas, rdp.phoenix.be:3389) en passant par ssh.phoenix.be.
On obtient donc: ssh -L 12345:rdp.phoenix.be:3389 ssh.phoenix.be .
Tu utiliseras comme ip

ort 127.0.0.1:12345 pour te connecter avec ton client rdp.
Si rdp.phoenix.be autorisait ssh depuis internet, tu obtiendrais: ssh -L 12345:localhost:3389 rdp.phoenix.be .