innmind / ssh-key-provider
Access user ssh keys from different locations
3.2.0
2023-11-01 07:55 UTC
Requires
- php: ~8.2
- innmind/filesystem: ~7.1
- innmind/http-transport: ~7.0
- innmind/immutable: ~4.9|~5.0
Requires (Dev)
- innmind/black-box: ~5.5
- innmind/coding-standard: ~2.0
- phpunit/phpunit: ~10.2
- vimeo/psalm: ~5.15
This package is auto-updated.
Last update: 2024-11-30 02:13:37 UTC
README
Small library to retrieve all public keys from different locations.
Installation
composer require innmind/ssh-key-provider
Usage
use Innmind\OperatingSystem\Factory; use Innmind\SshKeyProvider\{ Cache, Merge, Local, Github, }; use Innmind\Url\Path; $os = Factory::build(); $provide = Cache::of( Merge::of( Local::of( $os->filesystem()->mount(Path::of($_SERVER['USER'].'/.ssh/')), ), Github::of( $os->remote()->http(), 'GithubUsername', ), ), ); $sshKeys = $provide();
This example will retrieve all keys define in the GithubUsername
account and the key id_rsa.pub
on the local machine.