zoomyboy / php-ssh
此包最新版本(1.0.18)没有可用的许可证信息。
Ssh WWrapper围绕PhpSecLib
1.0.18
2020-07-16 14:56 UTC
Requires
- laravel/framework: ^7.0
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^7.0
README
检查登录
您可以检查ssh凭证是否有效 - 要么使用密码认证,要么使用PubKe认证
使用 Zoomyboy\PhpSsh\Client;
$sshValid = Client::auth($host, $user) ->withPassword($password) ->check(); $sshValid = Client::auth($host, $user) ->withKeyFile($keyFile) ->check();
密钥文件必须是到您的私钥文件的绝对路径login。
如果您真的想连接,您可以使用connect方法:$sshValid = Client::auth($host, $user) ->withKeyFile($keyFile) ->connect();