Struct ssh_jumper::SshJumper [−][src]
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
impl SshJumper
[src]
pub async fn open_tunnel(
ssh_tunnel_params: &SshTunnelParams<'_>
) -> Result<SocketAddr, Error>
[src]
ssh_tunnel_params: &SshTunnelParams<'_>
) -> Result<SocketAddr, Error>
pub async fn open_ssh_session(
jump_host_addr: &HostAddress<'_>,
jump_host_auth_params: &JumpHostAuthParams<'_>
) -> Result<AsyncSession<TcpStream>, Error>
[src]
jump_host_addr: &HostAddress<'_>,
jump_host_auth_params: &JumpHostAuthParams<'_>
) -> Result<AsyncSession<TcpStream>, Error>
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: &AsyncSession<TcpStream>,
local_socket: SocketAddr,
target_socket: &HostSocketParams<'_>
) -> Result<SocketAddr, Error>
[src]
ssh_session: &AsyncSession<TcpStream>,
local_socket: SocketAddr,
target_socket: &HostSocketParams<'_>
) -> Result<SocketAddr, Error>
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 Send for SshJumper
impl Sync for SshJumper
impl Unpin for SshJumper
impl UnwindSafe for SshJumper
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,