承接 divineomega/php-ssh-connection 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

divineomega/php-ssh-connection

最新稳定版本:v2.2.0

Composer 安装命令:

composer require divineomega/php-ssh-connection

包简介

Provides an elegant syntax to connect to SSH servers and execute commands.

README 文档

README

Build Status Coverage Status

The PHP SSH Connection package provides an elegant syntax to connect to SSH servers and execute commands. It supports both password and public-private keypair authentication, and can easily capture command output and errors.

Installation

You can install the PHP SSH Connection package by running the following Composer command.

composer require divineomega/php-ssh-connection

Usage

See the following basic usage instructions.

$connection = (new SSHConnection()) ->to('test.rebex.net') ->onPort(22) ->as('demo') ->withPassword('password') // ->withPrivateKey($privateKeyPath) // ->timeout(0) ->connect(); $command = $connection->run('echo "Hello world!"'); $command->getOutput(); // 'Hello World' $command->getError(); // '' $connection->upload($localPath, $remotePath); $connection->download($remotePath, $localPath);

For security, you can fingerprint the remote server and verify the fingerprint remains the same upon each subsequent connection.

$fingerprint = $connection->fingerprint(); if ($newConnection->fingerprint() != $fingerprint) { throw new Exception('Fingerprint does not match!'); }

If you wish, you can specify the type of fingerprint you wish to retrieve.

$md5Fingerprint = $connection->fingerprint(SSHConnection::FINGERPRINT_MD5); // default $sha1Fingerprint = $connection->fingerprint(SSHConnection::FINGERPRINT_SHA1);

统计信息

  • 总下载量: 105.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 112
  • 点击次数: 3
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 112
  • Watchers: 0
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-only
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固