summaryrefslogtreecommitdiff
path: root/src/channel.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel.rs')
-rw-r--r--src/channel.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/channel.rs b/src/channel.rs
index 82ac981..00a9493 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -204,6 +204,20 @@ impl Channel {
})
}
+ /// Requests that the remote host start an authentication agent;
+ /// if successful requests to that agent will be forwarded from
+ /// the server back to the local authentication agent on the client side.
+ ///
+ /// Note that some hosts are configured to disallow agent forwarding,
+ /// and that even if enabled, there is a possibility that starting
+ /// the agent on the remote system can fail.
+ pub fn request_auth_agent_forwarding(&mut self) -> Result<(), Error> {
+ let locked = self.lock();
+ locked
+ .sess
+ .rc(unsafe { raw::libssh2_channel_request_auth_agent(locked.raw) })
+ }
+
/// Execute a command
///
/// An execution is one of the standard process services defined by the SSH2