--- a/README.md Mon Mar 07 02:11:52 2022 -0600
+++ b/README.md Mon Mar 07 02:14:35 2022 -0600
@@ -202,7 +202,7 @@
If you want to integrate this container with an existing OpenSSH server and
keep HGKeeper only on the loopback device, you can do that by adding the
`HGK_EXTERNAL_HOSTNAME` and `HGK_EXTERNAL_PORT` environment variables. This
-will enable an `/ssh/authorized_keys` HTTP endpoint that we can tell OpenSSH
+will enable an `/hgk/authorized_keys` HTTP endpoint that we can tell OpenSSH server to use. We'll also change the port forwards from any interface on the
host to just the loopback device. To do this, you'd change the container
command to the following:
@@ -235,7 +235,7 @@
- AuthorizedKeysCommand curl -q http://<hostname>:<port>/ssh/authorized_keys?fp=%f
+ AuthorizedKeysCommand curl -q http://<hostname>:<port>/hgk/authorized_keys?fp=%f AuthorizedKeysCommandUser hg
@@ -366,7 +366,7 @@
- AuthorizedKeysCommand /usr/bin/curl -q http://<external-hostname>:<external-http-port>/ssh/authorized_keys?fp=%f
+ AuthorizedKeysCommand /usr/bin/curl -q http://<external-hostname>:<external-http-port>/hgk/authorized_keys?fp=%f AuthorizedKeysCommandUser hg
--- a/http/server.go Mon Mar 07 02:11:52 2022 -0600
+++ b/http/server.go Mon Mar 07 02:14:35 2022 -0600
@@ -48,10 +48,10 @@
mux := http.NewServeMux()
if s.externalHostname != "" {
- mux.Handle("/ssh/authorized_keys", authorizedKeysHandler(s.externalHostname, s.externalPort))
- log.Infof("added /ssh/authorized_keys endpoint with external hostname %s and export port %s", s.externalHostname, s.externalPort)
+ mux.Handle("/hgk/authorized_keys", authorizedKeysHandler(s.externalHostname, s.externalPort)) + log.Infof("added /hgk/authorized_keys endpoint with external hostname %s and export port %s", s.externalHostname, s.externalPort) - log.Infof("no external hostname specified, not adding /ssh/authorized_keys endpoint")
+ log.Infof("no external hostname specified, not adding /hgk/authorized_keys endpoint") mux.Handle("/static/", http.StripPrefix("/static", fileServer))