Skip to content

Commit 6b5cb02

Browse files
committed
Simplify the authorized_keys restrictions
Just use "restrict" instead of listing all restrictions under the sun. h/t to robryk for the suggestion
1 parent e7a8de8 commit 6b5cb02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ In the above setup, the CA runs as user `sshca` on host `cahost.example.com`.
7171
`authorized_keys` would look like this:
7272

7373
```
74-
command="/path/to/sshca run user",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc sk-ssh-ed25519@openssh.com [...]
75-
command="/path/to/sshca run anotheruser",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc sk-ssh-ed25519@openssh.com [...]
74+
command="/path/to/sshca run user",restrict sk-ssh-ed25519@openssh.com [...]
75+
command="/path/to/sshca run anotheruser",restrict sk-ssh-ed25519@openssh.com [...]
7676
```
7777

7878
The CA expects the location of the signing key in `~/.sshca.toml`:

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var rootCmd = &cobra.Command{
3131
certificates to users. It is commonly used like this in authorized_keys
3232
of a role account:
3333
34-
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="sshca run <username>" ssh-rsa [...]
34+
restrict,command="sshca run <username>" ssh-rsa [...]
3535
3636
It will take a JSON-encoded request on stdin and output a JSON structure
3737
containing a certificate to stdout.`,

0 commit comments

Comments
 (0)