Skip to content

Commit 56e9784

Browse files
authored
docs: Add IdentitiesOnly option to ssh command examples (#628)
1 parent d963932 commit 56e9784

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ and database.
110110

111111
By default, program configuration is stored within the `data` directory. But,
112112
this can be overridden by setting a custom path to a config file with `SOFT_SERVE_CONFIG_LOCATION`
113-
that is pre-created. If a config file pointed to by `SOFT_SERVE_CONFIG_LOCATION`,
113+
that is pre-created. If a config file pointed to by `SOFT_SERVE_CONFIG_LOCATION`,
114114
the default location within the `data` dir is used for generating a default config.
115115

116116
To change the default data path use `SOFT_SERVE_DATA_PATH` environment variable.
@@ -315,20 +315,25 @@ Soft Serve at its core manages your server authentication and authorization. Aut
315315

316316
To manage the server users, access, and repos, you can use the SSH command line interface.
317317

318-
Try `ssh localhost -i ~/.ssh/id_ed25519 -p 23231 help` for more info. Make sure
318+
Try `ssh localhost -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes -p 23231 help` for more info. Make sure
319319
you use your key here.
320320

321+
> **Note** The `IdentitiesOnly` option is used to prevent SSH from using any
322+
> other keys in your `~/.ssh` directory. This is useful when you have multiple
323+
> keys, and you want to use a specific key for Soft Serve.
324+
321325
For ease of use, instead of specifying the key, port, and hostname every time
322326
you SSH into Soft Serve, add your own Soft Serve instance entry to your SSH
323327
config. For instance, to use `ssh soft` instead of typing `ssh localhost -i
324-
~/.ssh/id_ed25519 -p 23231`, we can define a `soft` entry in our SSH config
328+
~/.ssh/id_ed25519 -o IdentitiesOnly=yes -p 23231`, we can define a `soft` entry in our SSH config
325329
file `~/.ssh/config`.
326330

327331
```conf
328332
Host soft
329333
HostName localhost
330334
Port 23231
331335
IdentityFile ~/.ssh/id_ed25519
336+
IdentitiesOnly yes
332337
```
333338

334339
Now, we can do `ssh soft` to SSH into Soft Serve. Since `git` is also aware of
@@ -341,7 +346,7 @@ git clone ssh://soft/dotfiles
341346
git push origin main
342347
```
343348

344-
> **Note** The `-i` part will be omitted in the examples below for brevity. You
349+
> **Note** The `-i` and `-o` parts will be omitted in the examples below for brevity. You
345350
> can add your server settings to your sshconfig for quicker access.
346351
347352
### Authentication

0 commit comments

Comments
 (0)