An open API service indexing awesome lists of open source software.

https://github.com/mazgi/openssh-authorizedkeyscommand-github

Get your SSH Public Key from GitHub.
https://github.com/mazgi/openssh-authorizedkeyscommand-github

authorizedkeyscommand ssh

Last synced: 6 months ago
JSON representation

Get your SSH Public Key from GitHub.

Awesome Lists containing this project

README

          

# OpenSSH AuthorizedKeysCommand GitHub

![GitHub Actions status for "test-all"](https://github.com/mazgi/openssh-authorizedkeyscommand-github/workflows/test-all/badge.svg)

Get your SSH Public Key from GitHub.

```console
> openssh-authorizedkeyscommand-github --help
OpenSSH AuthorizedKeysCommand GitHub

Usage:
openssh-authorizedkeyscommand-github --user=
openssh-authorizedkeyscommand-github (--help | --version)

Options:
--user= GitHub user.
-V, --version Show version.
-h, --help Show this screen.
```

## How to use

1. Place the binary in your `$PATH`.

```console
curl -L https://github.com/mazgi/openssh-authorizedkeyscommand-github/releases/download/v0.0.1/openssh-authorizedkeyscommand-github.x86_64-unknown-linux-gnu.tar.gz | sudo tar xz -C /usr/local/bin/
```

2. Update `/etc/ssh/sshd_config` like below.

```ssh_config
AuthorizedKeysCommandUser nobody
AuthorizedKeysCommand /usr/local/bin/openssh-authorizedkeyscommand-github --user %u
```

3. Restart SSH server.