Browse Source

docs: second ssh docs pass

decentral1se 3 years ago
parent
commit
d8179cfa3d
No known key found for this signature in database GPG Key ID: 3789458B3D0C410
  1. 40
      README.md

40
README.md

@ -168,16 +168,23 @@ Binaries are in `dist/`.
### SSH guide for `-P/--publish`
If you already know & use `scp` then `-P/--publish` should Just Work :tm: If
not, read on for some tips on how to configure your SSH client to help
`distribusi-go` make SSH connections successfully.
`distribusi-go` only supports one connection method right now: SSH public key
authentication using `ssh-agent`. This is mostly for simplicity, there is a
discussion running [over here] if you'd like to see more methods available.
The simplest way to make sure `distribusi` can make an SSH connection with your
server is to match a `~/.ssh/config` entry with the `-P <server>:...` server
value you pass on the command-line.
Let's take a practical example. First, make sure your `ssh-agent` is running
and your SSH key is loaded:
If you want to run `./distribusi -p <path> -P varia.zone:/var/www/`, then a
matching `~/.ssh/config` entry might look like this:
```
eval $(ssh-agent -k)
ssh-add ~/.ssh/<ssh-secret-key-part>
ssh-add -L # see loaded keys
```
Now, when you type `-P <server>:...`, `distribusi-go` will look up an entry in
your `~/.ssh/config` with a matching `<server>` value. I.e. if you want to run
`./distribusi -p <path> -P varia.zone:/var/www/`, then a matching
`~/.ssh/config` entry might look like this:
```ssh
Host varia.zone
@ -187,18 +194,10 @@ Host varia.zone
IdentityFile ~/.ssh/<ssh-secret-key-part>
```
This tells `distribusi-go` everything it needs to know to make a successful SSH
connection. Run with `-d/--debug` for extra help figuring out what connection
details are being used.
If you have a secret protected SSH key then make sure you've got a running
`ssh-agent` and have added the key with the following:
`distribusi-go` will read the `User` and `Port` values from this configuration.
```
eval $(ssh-agent -k)
ssh-add ~/.ssh/<ssh-secret-key-part>
ssh-add -L # see loaded keys
```
If all else fails, try `-d/--debug` for extra help figuring out what SSH
connection details are used. You can [open a ticket] and we can try and help.
[Go]: https://go.dev
[Pillow]: https://pillow.readthedocs.io/en/stable/installation.html#external-libraries
@ -207,8 +206,9 @@ ssh-add -L # see loaded keys
[on go.dev]: https://go.dev/doc/install/source#environment
[on pkg.go.dev]: https://pkg.go.dev/path/filepath#Match
[open a ticket]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/new/choose
[over here]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/4
[report issues]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/new/choose
[scp]: https://linux.die.net/man/1/scp
[the entire listing]: https://vvvvvvaria.org/~decentral1se/distribusi-go/
[this book]: https://www.gopl.io/
[this ticket]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/1
[scp]: https://linux.die.net/man/1/scp

Loading…
Cancel
Save