hernandev/yoke
Composer 安装命令:
composer create-project hernandev/yoke
包简介
Yoke: SSH Connection Manager/Wallet
README 文档
README
Yoke is a PHP based SSH connection manager. Sometimes storing servers hosts, usernames, ports and passwords can be tricky, SSH Key authentication makes it easier for us, but it doesn't solve the problem of remembering all the other information. Also, sometimes we face ourselves with more than one private key to authenticate with (like multiple accounts on AWS).
Yoke aims to be a single repository for server managements to allow you to fastly connect to your servers just by remembering it's alias, like.
yoke connect myserver
With security in mind, all information about your servers is encrypted using AES 256.
NOTICE The encryption key is also stored into your computer, Yoke encryption only makes it harder for users to identify and decrypt the information. But just like SSH private keys, it does not protect against people getting access to your filesystem.
Installation
In order to use Yoke, you need PHP 8+ installed, with openssl extension enables (default on most installs)
The installation process is based on the global composer packages, so you need to have a working composer install with the correct binary path settings. Read this tutorial
If you have the requirements, install Yoke by running:
composer global require yokessh/yoke
This is all you need to do! Time for usage instructions.
Usage
Using Yoke is really simple and straightforward.
Adding a Server Connection
In order to store a new connection, just run the command
yoke add [alias]
You will then be presented with a few questions:
Registering a new Server Configuration!
Server connection alias (server1): sample-server
👤 Server username (none): sample-user
🖥️ Server hostname or IP Address (192.168.0.1): server.sampleapp.com
🚪 Server Port (22): 6262
🔐 Authentication Method:[system|key|password] (system): key
🔑 Private Key (~/.ssh/id_rsa):
Server registered successfully! 🥳
Connecting
As we have this connection in place, we can establish a connection, anytime we want just by running a simple command:
yoke connect sample-server
In case it's a server with a password, you can optionally ask to show the password when connecting:
yoke connect sample-server --password
Easy right?
Listing connections
Forgot a server alias? Don't worry, you can just run:
yoke servers
To see a list of stored connections, like this one
+---------------+----------------------+-------------+------+--------------+ | Name | Host | Username | Port | Auth. Method | +---------------+----------------------+-------------+------+--------------+ | server-a | a.sampleapp.comm | admin | 22 | key | | server-b | b.sampleapp.com | root | 2222 | system | | server-c | c.sampleapp.com | root | 22 | password | +---------------+----------------------+-------------+------+--------------+
Removing a connection
Don't need a stored connection anymore?
Just run
yoke delete alias
Confirm the deletion and it's done!.
Final Notes:
There are 3 different allows authentication types:
key- uses a specified private key to establish the connectionsystem- Do not specify a private key to connect, it lets ssh try to connection with current user's keypassword- SSH does not allow passing plain password as a parameter, Yoke will just show the password on screen, so you can copy and paste it. Password authentication is highly unrecommended.
hernandev/yoke 适用场景与选型建议
hernandev/yoke 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 159 次下载、GitHub Stars 达 44, 最近一次更新时间为 2016 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「manager」 「ssh」 「wallet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hernandev/yoke 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hernandev/yoke 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hernandev/yoke 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The BlockTrail PHP SDK, for integration of Bitcoin functionality through the BlockTrail API
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
A flexible FTP, SSL-FTP, and SSH-based SFTP client for PHP. This lib provides helpers that are easy to use to manage the remote files.
Library for validation of cryptocoin wallets
Altax is an extensible deployment tool for PHP.
Cisco IOS communications and configuration parsing library
统计信息
- 总下载量: 159
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 44
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-12