summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-10-23 12:13:00 -0400
committerAndrew Cady <d@cryptonomic.net>2021-10-23 12:21:24 -0400
commit2696429ad843fa2d74f5607245140c9d1e13159b (patch)
treecbd3b10f2178e9c152648b3ae0944b582284d6e0
parentc1f1b3f92b8e7da270ae2ff9acb690d09526e255 (diff)
README
-rw-r--r--Makefile3
-rw-r--r--README.md96
-rw-r--r--README.txt108
3 files changed, 99 insertions, 108 deletions
diff --git a/Makefile b/Makefile
index 7e1a74c..b203340 100644
--- a/Makefile
+++ b/Makefile
@@ -25,4 +25,7 @@ install:
25 $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" AuthorizedKeysCommand || true 25 $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" AuthorizedKeysCommand || true
26 [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand 26 [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand
27 27
28README.html: README.md
29 pandoc -t html $< > $@
30
28include tests.makefile 31include tests.makefile
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d4b8127
--- /dev/null
+++ b/README.md
@@ -0,0 +1,96 @@
1AnonymousSSH
2------------
3
4
5
6
7
8
9WHAT IT DOES
10------------
11
12This repository contains the code to share itself (the repository)
13through Git-over-SSH.
14
15It also contains the code to listen for changes sent to itself through
16Git-over-SSH.
17
18
19
20
21
22
23HOW IT WORKS
24------------
25
26Git contains a program `git-receive-pack` which implements a git
27protocol server. The `git-receive-pack` expects to be launched as an SSH
28server "ForcedCommand" in a configuration that protects the server from
29untrustworthy users.
30
31Normally, the SSH server only permits users who have already uploaded
32their public keys to the server. It assumes that access should be closed
33to new users.
34
35Installing this code reverses that assumption, granting open access to
36unrecognized users. This is made safe by limiting write access to a
37GIT_NAMESPACE over which the user proves global mathematical ownership
38with their SSH client key.
39
40
41
42
43
44
45HOW TO INSTALL
46--------------
47
48Run:
49```
50 make
51```
52
53This installs the `AnonymousAccessCommand` in the current user's home
54directory.
55
56Then, if sudo access is available, it enables anonymous access by
57editing the system `OpenSSH` configuration.
58
59
60
61
62
63
64NON-ROOT INSTALLATION
65---------------------
66
67If sudo access is not available, you can install to a different
68location:
69
70```
71 make SSH_CONFIG_DIR=.config/ssh \
72 SSHD_CONFIG_DIR=.config/ssh/config.d \
73 SSH_LIB_DIR=.local/lib/ssh
74```
75
76Then you will need to run `OpenSSH` on a non-default port (the default
77port requires root access).
78
79
80
81
82
83
84ALTERNATIVE LOCATION OF `AnonymousAccessCommand`
85------------------------------------------------
86
87It is also possible to choose the location of the
88`AnonymousAccessCommand` itself:
89
90```
91 make USER_SSH_CONFIG_DIR=$HOME/.config/ssh
92```
93
94First you would have to make the contents of the installed file
95`AuthorizedKeysCommand` vary according to that `Makefile` paremeter, by
96editing `Makefile`.
diff --git a/README.txt b/README.txt
deleted file mode 100644
index e65cdbe..0000000
--- a/README.txt
+++ /dev/null
@@ -1,108 +0,0 @@
1WHAT IT DOES
2------------
3
4This repository contains the code to share itself through Git-over-SSH.
5
6It also contains the code to listen for changes sent to itself through
7Git-over-SSH.
8
9
10
11
12.
13.
14.
15.
16.
17.
18
19
20
21HOW IT WORKS
22------------
23
24Git contains a program `git-receive-pack` which implements a git protocol
25server. The `git-receive-pack` expects to be launched as an SSH server
26"ForcedCommand" in a configuration that protects the server from untrustworthy
27users.
28
29
30
31.
32.
33.
34.
35.
36.
37HOW TO INSTALL
38--------------
39
40
41Run:
42
43
44 make
45
46
47
48This installs the `AnonymousAccessCommand` in the current user's home directory.
49
50Then, if sudo access is available, it enables anonymous access by editing the
51system `OpenSSH` configuration.
52
53
54
55.
56.
57.
58.
59.
60.
61
62
63
64NON-ROOT INSTALLATION
65---------------------
66
67If sudo access is not available, you can install to a different location:
68
69```
70 make SSH_CONFIG_DIR=.config/ssh \
71 SSHD_CONFIG_DIR=.config/ssh/config.d \
72 SSH_LIB_DIR=.local/lib/ssh
73```
74
75Then you will need to run `OpenSSH` on a non-default port (the default port
76requires root access).
77
78
79
80.
81.
82.
83.
84.
85.
86
87
88
89ALTERNATIVE LOCATION OF `AnonymousAccessCommand`
90------------------------------------------------
91
92It is also possible to choose the location of the `AnonymousAccessCommand` itself:
93
94```
95 make USER_SSH_CONFIG_DIR=/.config/ssh
96```
97
98First you will have to make `AuthorizedKeysCommand` vary according to that
99paremeter.
100
101
102
103
104
105
106
107
108