Let's look at the real
ssh(1) man page instead of that webpage:
There are four forms of the
-R option, and the one you quoted is the first one. It forwards a TCP port on the system that has the remote end of the SSH connection to the specified host and TCP port number on the local side of the connection.
The second form describes how to forward a remote TCP port to a local Unix socket:
ssh -R 1234:/tmp/local_socket user@remote_host
In other words, when something connects to TCP port 1234 on the
remote_host, the connection will be forwarded to Unix socket
/tmp/local_socket on the local host.
The third form describes how to do it the opposite way, remote socket to a TCP port on the local side:
ssh -R /tmp/remote_socket:1234:somehost user@remote_host
Here, a process on remote_host can use Unix socket
/tmp/remote_socket and the connection will be passed through the SSH connection to the local side, and then over a regular TCP connection to TCP port 1234 of
The fourth form describes forwarding from a remote Unix socket to a local one:
ssh -R /tmp/remote_socket:/tmp/local_socket user@remote_host
Here, a process on
remote_host could open the Unix socket at
/tmp/remote_socket to connect to
/tmp/local_socket on local host.