Difference between revisions of "Ssh -L"
Jump to navigation
Jump to search
(Created page with "{{lowercase}} == See also == * {{ssh}} Category:OpenSSH") |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
+ | https://man.openbsd.org/ssh | ||
+ | <pre> | ||
+ | L [bind_address:]port:remote_socket | ||
+ | |||
+ | -L local_socket:host:hostport | ||
+ | |||
+ | -L local_socket:remote_socket | ||
+ | Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by allocating a socket to listen to either a TCP port on the local side, optionally bound to the specified bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or the Unix socket remote_socket, from the remote machine. | ||
+ | Port forwardings can also be specified in the configuration file. Only the superuser can forward privileged ports. IPv6 addresses can be specified by enclosing the address in square brackets. | ||
+ | By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of “localhost” indicates that the listening port be bound for local use only, while an empty address or ‘*’ indicates that the port should be available from all interfaces. | ||
+ | </pre> | ||
+ | |||
+ | == Related == | ||
+ | * [[ssh tunnel]] | ||
+ | * <code>[[ssh -R]]</code> | ||
== See also == | == See also == | ||
− | * {{ssh}} | + | * {{ssh (openSSH)}} |
[[Category:OpenSSH]] | [[Category:OpenSSH]] |
Latest revision as of 12:41, 25 January 2024
L [bind_address:]port:remote_socket -L local_socket:host:hostport -L local_socket:remote_socket Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by allocating a socket to listen to either a TCP port on the local side, optionally bound to the specified bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or the Unix socket remote_socket, from the remote machine. Port forwardings can also be specified in the configuration file. Only the superuser can forward privileged ports. IPv6 addresses can be specified by enclosing the address in square brackets. By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of “localhost” indicates that the listening port be bound for local use only, while an empty address or ‘*’ indicates that the port should be available from all interfaces.
Related[edit]
See also[edit]
- OpenSSH:
ssh
,ssh -O
,-i, -t
,-T, -N, -V
,/etc/ssh/ssh_config
,ssh --help
Advertising: