r3n0e0/ssh-config
Composer 安装命令:
composer require r3n0e0/ssh-config
包简介
A ssh config parser for PHP
README 文档
README
A ssh config parser in PHP
Example
use SshConfig\Config;
$config = Config::parse(file_get_contents('<filepath>'));
var_dump($config);
Result:
array(2) {
[0] =>
array(2) {
'Host' =>
string(5) "hello"
'Config' =>
array(4) {
'HostName' =>
string(11) "example.com"
'User' =>
string(3) "wow"
'Port' =>
string(2) "22"
'IdentityFile' =>
string(19) "~/.ssh/id_rsa_hello"
}
}
[1] =>
array(2) {
'Host' =>
string(1) "*"
'Config' =>
array(3) {
'PasswordAuthentication' =>
string(2) "no"
'ChallengeResponseAuthentication' =>
string(2) "no"
'HashKnownHosts' =>
string(3) "yes"
}
}
}
License
MIT
统计信息
- 总下载量: 79
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-20