Go to file
2017-04-10 18:04:54 +02:00
.gitignore Initial commit 2017-04-10 15:59:14 +00:00
example.json Added source code 2017-04-10 18:04:54 +02:00
LICENSE Initial commit 2017-04-10 15:59:14 +00:00
main.go Added source code 2017-04-10 18:04:54 +02:00
README.md Added source code 2017-04-10 18:04:54 +02:00

Generate an authorized_keys file:

When working with borg serve in an automated environment, you should use an authorized_keys file that restricts the ssh sessions to use only borg, and only in the directory where the repo they should use lies in. This binary takes in a json file specifying the needed info and prints out the wanted authorized_keys file.

To generate that file, do this (assuming you have set up everything needed for go get, and $GOPATH/bin is in your $PATH):

go get git.jcg.re/jcgruenhage/borg-gen-auth-keys
borg-gen-auth-keys yourjsonfile.json > ~/.ssh/authorized_keys