Struct ssh_jumper::SshJumper [−][src]
pub struct SshJumper;
Expand description
Forwards a local port to the target host through the jump host over SSH.
You are most likely interested in the following 3 methods:
Self::open_tunnel
: Opens an SSH session and creates a tunnel from a local port to the target.Self::open_ssh_session
: Opens an SSH session, but does not create the tunnel.Self::open_direct_channel
: Creates the tunnel using an existing SSH session.
Implementations
pub async fn open_tunnel(
ssh_tunnel_params: &SshTunnelParams<'_>
) -> Result<SocketAddr, Error>
[src]
pub async fn open_tunnel(
ssh_tunnel_params: &SshTunnelParams<'_>
) -> Result<SocketAddr, Error>
[src]pub async fn open_ssh_session(
jump_host_addr: &HostAddress<'_>,
jump_host_auth_params: &JumpHostAuthParams<'_>
) -> Result<SshSession, Error>
[src]
pub async fn open_ssh_session(
jump_host_addr: &HostAddress<'_>,
jump_host_auth_params: &JumpHostAuthParams<'_>
) -> Result<SshSession, Error>
[src]Opens an SSH session to a host.
Parameters
jump_host_addr
: Address of the jump host.jump_host_auth_params
: SSH authentication parameters.
pub async fn open_direct_channel(
ssh_session: &SshSession,
local_socket: SocketAddr,
target_socket: &HostSocketParams<'_>
) -> Result<SocketAddr, Error>
[src]
pub async fn open_direct_channel(
ssh_session: &SshSession,
local_socket: SocketAddr,
target_socket: &HostSocketParams<'_>
) -> Result<SocketAddr, Error>
[src]Returns the local address to a new tunnel to the given target host.
The returned socket address may be different to the passed in local socket address. For example, the passed in address may specify port 0, which means the operating system choose an available port to use.
Parameters
ssh_session
: Existing SSH session to create the tunnel through.local_socket
: The local socket specification.target_socket
: The address of the target host to connect to.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SshJumper
impl UnwindSafe for SshJumper