
Specifying a remote bind_address will only succeed if the server's GatewayPorts option is enabled (see sshd_config(5)). An empty bind_address, or the address ‘*’, indicates that the remote socket should listen on all interfaces. This may be overridden by specifying a bind_address. IPv6 addresses can be specified by enclosing the address in square brackets.īy default, TCP listening sockets on the server will be bound to the loopback interface only. Privileged ports can be forwarded only when logging in as root on the remote machine. Port forwardings can also be specified in the configuration file. Whenever a connection is made to this port or Unix socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or local_socket, from the local machine. This works by allocating a socket to listen to either a TCP port or to a Unix socket on the remote side. Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the given host and port, or Unix socket, on the local side. 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. However, an explicit bind_address may be used to bind the connection to a specific address. IPv6 addresses can be specified by enclosing the address in square brackets.īy default, the local port is bound in accordance with the GatewayPorts setting. Only the superuser can forward privileged ports. 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. 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. 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. Keep in mind these are arguments to the ssh commands, so they work in the context of a SSH connexion to a remote host you have access to. If you don't know what SSH tunnels are, you can read more about them here or in the man page in the -L and -R sections.

SSH Tunnel Manager is a macOS application to manage SSH tunnels.
