ssh-key — account
keys and HTTPS tokens
ssh |
chroot.dev ssh-key list |
ssh |
chroot.dev ssh-key add
[key] |
ssh |
chroot.dev ssh-key rm
key |
ssh |
chroot.dev ssh-key generate-api-key
[--cmds list]
[--exp time]
[--label label]
[--vm name] |
list
- Keys of the account.
add
[key]
- Add a public key; without key, read it from standard
input.
‘
github:user’
or
‘sourcehut:~user’
adds the public keys of that account, copied once.
rm
key
- Remove a key by fingerprint, comment or the key itself.
generate-api-key
- Create a key and print a token for it:
--cmds
list
- Comma-separated commands the token may run. The default is help, ls,
new, whoami, ssh-key list and share show.
--exp
time
- Validity: ‘
12h’,
‘30d’,
‘1y’ or
‘never’, the default.
--label
label
- Comment of the key, used to revoke it. The default is
‘
api’.
--vm
name
- A token for the HTTPS of that VM instead of
/exec.
$ ssh chroot.dev ssh-key add < ~/.ssh/id_laptop.pub
$ ssh chroot.dev ssh-key add github:alice
$ ssh chroot.dev ssh-key generate-api-key --label ci --exp 30d
$ ssh chroot.dev ssh-key rm ci