Ответ 1
Для openssh см. переключатель -R
:
-R [bind_address:]port:host:hostport
Specifies that the given port on the remote (server) host is to
be forwarded to the given host and port on the local side. This
works by allocating a socket to listen to port on the remote
side, and whenever a connection is made to this port, the connec‐
tion is forwarded over the secure channel, and a connection is
made to host port hostport from the local machine.
Несмотря на то, что могут быть лучшие решения, вы можете создать прокси-сервер SOCKS на своем другом компьютере remotehost
на порту 24680 следующим образом. Во-первых, do
ssh -R 24680:localhost:12345 remotehost
И затем, do
ssh -D 12345 localhost
Очевидно, что обе сессии нужно поддерживать одновременно.