zoomyboy/php-ssh

此包最新版本(1.0.18)没有可用的许可证信息。

Ssh WWrapper围绕PhpSecLib

1.0.18 2020-07-16 14:56 UTC

This package is auto-updated.

Last update: 2024-09-17 01:01:32 UTC


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();