From 9f0c6e30cfea1c1b9f24fe0ee5811ace24d304b6 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 18 Feb 2019 16:33:04 -0500 Subject: Initial --- readme.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 readme.md (limited to 'readme.md') diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..eb87175 --- /dev/null +++ b/readme.md @@ -0,0 +1,43 @@ +# SSH Auth to Gogs or Github + +Small program to call out to a (patched) Gogs server and pull SSH keys +from the API. + +This should work for Github as well with the endpoint adjusted. + +The main utility of this program is to be used to provide SSH keys to a Unix +server without the need to manually place them on it. + + +## Installing + +``` +go get git.stridet.com/Stridet/sshauth +``` + +``` +sudo install -m 555 -o root -g bin $GOPATH/bin/sshauth /usr/local/bin/ +``` + +And then in `/etc/ssh/sshd_config` +``` +AuthorizedKeysCommand sshauth -e https://git.stridet.com/api/v1 -u %u +``` + +See: http://man.openbsd.org/sshd_config#AuthorizedKeysCommand for more +information. + +## Gogs Patch + +Used on commit `2c3e2b701e012294d457937e6bfbffd63dd8ae4f` it should work +as expected with `git apply` and `go build` + +## Notes + +This obviously requires that your server have a working internet connection. +Without it it'll just time out and you'll be locked out. This usually isn't +a problem if you're using SSH though. + +If you have a highly restrictive firewall you're going to want to be sure to +set up a special user and allow outbound network access. + -- cgit v1.2.3