edno / codeception-secureshell
此包已被弃用且不再维护。作者建议使用 dianaolaru/codeception-secureshell 包。
提供SSH功能的Codeception扩展:SSH命令、SSH文件传输、SSH隧道
0.1.0
2016-07-03 20:54 UTC
Requires
- php: ^5.6 || ^7.0
- ext-ssh2: >=0.13
- codeception/codeception: ^2.2
Requires (Dev)
- satooshi/php-coveralls: ^1.0
This package is auto-updated.
Last update: 2022-03-09 10:28:56 UTC
README
此仓库不再维护。如需更新版本,请参考 dianaolaru/codeception-secureshell。
Codeception Secure Shell
用于 Codeception 的模块,提供 SSH命令、SFTP访问 和 SSH隧道
如果您只需要 SFTP 连接,请考虑内置的 Codeception FTP模块。
路线图
- 0.1:测试远程文件系统和命令的基本命令
- 0.2:隧道命令
- 0.3:服务和高级命令
最低要求
- Codeception 2.2
- PHP 5.6
- 扩展 SecureShell2
安装
可以使用 Composer 安装此模块
$ composer require edno/codeception-secureshell
请确保如以下配置所示启用模块。
配置
在配置文件 .yml
中启用 Secure Shell。
module: enabled: - Codeception\Extension\SecureShell
参数
默认情况下,模块总是 接受主机公钥指纹。
您可以将配置参数 StrictHostKeyChecking
设置为 true
来启用严格模式,其中仅接受已知主机。
启用后,模块将验证主机指纹与您的 Codeception 项目根目录中的 known_hosts
文件进行比较。
modules: config: Codeception\Extension\SecureShell: StrictHostKeyChecking: true
如果您想重用现有的 known_hosts
文件,可以使用参数 KnownHostsFile
指定文件位置。
modules: config: Codeception\Extension\SecureShell: StrictHostKeyChecking: true KnownHostsFile: '/etc/ssh/known_hosts'
该文件必须遵守 OpenSSH ~/.ssh/known_hosts 格式。
文档
文档可在wiki中查看 命令和方法列表。