src/Biz/Util/Phpsec/System/SSH/Agent.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* Pure-PHP ssh-agent client.
*
* PHP version 5
*
* Here are some examples of how to use this library:
* <code>
* <?php
* include 'vendor/autoload.php';
*
* $agent = new \Biz\Util\Phpsec\System\SSH\Agent();
*
* $ssh = new \Biz\Util\Phpsec\Net\SSH2('www.domain.tld');
* if (!$ssh->login('username', $agent)) {
* exit('Login Failed');
* }
*
* echo $ssh->exec('pwd');
* echo $ssh->exec('ls -la');
* ?>
* </code>
*
* @category System
*
* @internal See http://api.libssh.org/rfc/PROTOCOL.agent
*
* @author Jim Wigginton <terrafrost@php.net>
* @copyright 2014 Jim Wigginton
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*
* @see http://phpseclib.sourceforge.net
*/
namespace Biz\Util\Phpsec\System\SSH;
use Biz\Util\Phpsec\Crypt\RSA;
use Biz\Util\Phpsec\System\SSH\Agent\Identity;
/**
* Pure-PHP ssh-agent client identity factory.
*
* requestIdentities() method pumps out \Biz\Util\Phpsec\System\SSH\Agent\Identity objects
*
*
* @author Jim Wigginton <terrafrost@php.net>
*/
class Agent
{
/**#@+
* Message numbers
*
* @access private
*/
// to request SSH1 keys you have to use SSH_AGENTC_REQUEST_RSA_IDENTITIES (1)
const SSH_AGENTC_REQUEST_IDENTITIES = 11;
// this is the SSH2 response; the SSH1 response is SSH_AGENT_RSA_IDENTITIES_ANSWER (2).
const SSH_AGENT_IDENTITIES_ANSWER = 12;
// the SSH1 request is SSH_AGENTC_RSA_CHALLENGE (3)
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。