Top Methods
org.apache.sshd.common.forward

public Interface PortForwardingManager

extends PortForwardingInformationProvider
Known Direct Subinterfaces
org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.forward.Forwarder
Imports
java.io.IOException, org.apache.sshd.common.util.net.SshdSocketAddress

Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public SshdSocketAddress

Returns:

The bound SshdSocketAddress
startDynamicPortForwarding
(SshdSocketAddress
The local address
local
)

Start dynamic local port forwarding using a SOCKS proxy.

public default SshdSocketAddress

Returns:

The bound SshdSocketAddress
startLocalPortForwarding
(int
The local port - if zero then one will be allocated
localPort
,
SshdSocketAddress
The remote address
remote
)

Start forwarding the given local port on the client to the given address on the server.

public SshdSocketAddress

Returns:

The bound SshdSocketAddress
startLocalPortForwarding
(SshdSocketAddress
The local address
local
,
SshdSocketAddress
The remote address
remote
)

Start forwarding the given local address on the client to the given address on the server.

public SshdSocketAddress

Returns:

The bound SshdSocketAddress
startRemotePortForwarding
(SshdSocketAddress
The remote address
remote
,
SshdSocketAddress
The local address
local
)

Start forwarding tcpip from the given address on the server to the given address on the client.

public void
stopDynamicPortForwarding(SshdSocketAddress
The local address
local
)

Stop a previously started dynamic port forwarding.

public void
stopLocalPortForwarding(SshdSocketAddress
The local address
local
)

Stop forwarding the given local address.

public void
stopRemotePortForwarding(SshdSocketAddress
The remote address
remote
)

Stop forwarding of the given remote address.

Inherited from org.apache.sshd.common.forward.PortForwardingInformationProvider:
getBoundLocalPortForwardsgetBoundRemotePortForwardgetLocalForwardsBindingsgetRemoteForwardsBindingsgetStartedLocalPortForwardsgetStartedRemotePortForwardsisLocalPortForwardingStartedForPortisRemotePortForwardingStartedForPort

Method Detail

startDynamicPortForwardingback to summary
public SshdSocketAddress startDynamicPortForwarding(SshdSocketAddress local) throws IOException

Start dynamic local port forwarding using a SOCKS proxy.

Parameters
local:SshdSocketAddress

The local address

Returns:SshdSocketAddress

The bound SshdSocketAddress

Exceptions
IOException:
If failed to create the requested binding
startLocalPortForwardingback to summary
public default SshdSocketAddress startLocalPortForwarding(int localPort, SshdSocketAddress remote) throws IOException

Start forwarding the given local port on the client to the given address on the server.

Parameters
localPort:int

The local port - if zero then one will be allocated

remote:SshdSocketAddress

The remote address

Returns:SshdSocketAddress

The bound SshdSocketAddress

Exceptions
IOException:
If failed to create the requested binding
startLocalPortForwardingback to summary
public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException

Start forwarding the given local address on the client to the given address on the server.

Parameters
local:SshdSocketAddress

The local address

remote:SshdSocketAddress

The remote address

Returns:SshdSocketAddress

The bound SshdSocketAddress

Exceptions
IOException:
If failed to create the requested binding
startRemotePortForwardingback to summary
public SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException

Start forwarding tcpip from the given address on the server to the given address on the client. The remote host name is the address to bind to on the server:

  • "" means that connections are to be accepted on all protocol families supported by the SSH implementation
  • "0.0.0.0" means to listen on all IPv4 addresses
  • "::" means to listen on all IPv6 addresses
  • "localhost" means to listen on all protocol families supported by the SSH implementation on loopback addresses only, [RFC3330] and RFC3513]
  • "127.0.0.1" and "::1" indicate listening on the loopback interfaces for IPv4 and IPv6 respectively
Parameters
remote:SshdSocketAddress

The remote address

local:SshdSocketAddress

The local address

Returns:SshdSocketAddress

The bound SshdSocketAddress

Exceptions
IOException:
If failed to create the requested binding
stopDynamicPortForwardingback to summary
public void stopDynamicPortForwarding(SshdSocketAddress local) throws IOException

Stop a previously started dynamic port forwarding.

Parameters
local:SshdSocketAddress

The local address

Exceptions
IOException:
If failed to cancel the requested binding
stopLocalPortForwardingback to summary
public void stopLocalPortForwarding(SshdSocketAddress local) throws IOException

Stop forwarding the given local address.

Parameters
local:SshdSocketAddress

The local address

Exceptions
IOException:
If failed to cancel the requested binding
stopRemotePortForwardingback to summary
public void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException

Stop forwarding of the given remote address.

Parameters
remote:SshdSocketAddress

The remote address

Exceptions
IOException:
If failed to cancel the requested binding