diff --git a/channels.c b/channels.c index 4ac7d98ee..1f78704c2 100644 --- a/channels.c +++ b/channels.c @@ -5011,6 +5011,9 @@ channel_connect_by_listen_path(struct ssh *ssh, const char *path, for (i = 0; i < pset->num_permitted_user; i++) { perm = &pset->permitted_user[i]; if (open_listen_match_streamlocal(perm, path)) { + if (perm->port_to_connect == 0) + return rdynamic_connect_prepare(ssh, + ctype, rname); return connect_to(ssh, perm->host_to_connect, perm->port_to_connect, ctype, rname); diff --git a/ssh.1 b/ssh.1 index aaffee96f..f524453f7 100644 --- a/ssh.1 +++ b/ssh.1 @@ -601,6 +601,11 @@ Causes most warning and diagnostic messages to be suppressed. .Ar port .Sm on .Xc +.It Fl R Xo +.Sm off +.Ar remote_socket +.Sm on +.Xc Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the local side. .Pp