Get your SSH Public Key from GitHub.
> openssh-authorizedkeyscommand-github --help
OpenSSH AuthorizedKeysCommand GitHub
Usage:
openssh-authorizedkeyscommand-github --user=<user>
openssh-authorizedkeyscommand-github (--help | --version)
Options:
--user=<user> GitHub user.
-V, --version Show version.
-h, --help Show this screen.
- Place the binary in your
$PATH
.
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/
- Update
/etc/ssh/sshd_config
like below.
AuthorizedKeysCommandUser nobody
AuthorizedKeysCommand /usr/local/bin/openssh-authorizedkeyscommand-github --user %u
- Restart SSH server.