summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2020-02-22 08:22:02 -0800
committerWez Furlong <wez@wezfurlong.org>2020-02-22 08:32:26 -0800
commite9ac51eee7070a4d2917a03260a83180e312726d (patch)
tree9657a488c7aab4f71827227c1706b423032fcf7d /src
parent057083ebfd9b422d71bd6c836037e34072bcd32b (diff)
downloadssh2-rs-e9ac51eee7070a4d2917a03260a83180e312726d.zip
Add Channel::request_auth_agent_forwarding
This method enables agent forwarding
Diffstat (limited to 'src')
-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