mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
removed stopSSHForwarding
This commit is contained in:
parent
8571d0c6d7
commit
25b328c440
@ -350,21 +350,6 @@ class System_SSH_Agent
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request the remote server to stop forwarding authentication requests to the local SSH agent
|
||||
*
|
||||
* @param Net_SSH2 $ssh
|
||||
* @return Boolean
|
||||
* @access public
|
||||
*/
|
||||
function stopSSHForwarding($ssh)
|
||||
{
|
||||
if ($this->request_forwarding) {
|
||||
$ssh->_close_channel(NET_SSH2_CHANNEL_AGENT_FORWARD);
|
||||
$this->request_forwarding = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The worker function to make a request to a remote server
|
||||
* asking it to forward authentication requests to the local SSH
|
||||
|
@ -47,9 +47,6 @@ class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase
|
||||
$agent->startSSHForwarding($ssh);
|
||||
$this->assertEquals($username, trim($ssh->exec("ssh " . $username . "@" . $hostname . ' \'whoami\'')));
|
||||
|
||||
$agent->stopSSHForwarding($ssh);
|
||||
$this->assertEquals('failure?', trim($ssh->exec("ssh " . $username . "@" . $hostname . ' \'whoami\'')));
|
||||
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user