ssh-ca-client

This provides the client-side service to interact with the Serverless
Certificate Authority.
Upgrading from 0.x? Read Upgrading to 1.0 first:
the command line and configuration are checked more strictly, the systemd
units are sandboxed, and Intune needs the new Group Policy templates.
Installing
There are two versions of the client, one CLI based and the other GUI based both of which
are tested on Windows and Linux (see Supported Platforms).

On Linux the client is available from the Snapcraft store, however at this time
there are additional steps required to allow the snap version access to the SSH
authentication agent socket due to it's strict confinement.
An example wrapper script is located under snap/scripts/wrapper.sh that uses
socat to listen on a socket in your home directory and proxies any access to
the "real" SSH authentication agent socket.
In addition you must manually connect the following interfaces for this snap:
# allow access to the Gnome Keyring
sudo snap connect ssh-ca-client:password-manager-service
# connect the home interface to allow access to ssh-agent socket in $HOME
sudo snap connect ssh-ca-client:home
# start via wrapper script
path/to/wrapper.sh
Alternatively binary releases and a Debian/Ubuntu package for Linux are
available from the GitHub Releases page or you may add the APT repository to
your system as follows:
curl -fsSL https://packages.hebs.net.au/ssh-ca-client/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/ssh-ca-client.gpg
echo "deb [signed-by=/usr/share/keyrings/ssh-ca-client.gpg] https://packages.hebs.net.au/ssh-ca-client stable main" | sudo tee /etc/apt/sources.list.d/ssh-ca-client.list
sudo apt-get update
sudo apt-get install ssh-ca-client
Removing the package stops the host-ssh-certificate-renewal and
user-ssh-krl-refresh timers, and purging it also disables them. Installing
the package again after removing it starts the timers that are still enabled.
If you
enabled the host-ssh-krl-refresh user timer, disable it yourself with
systemctl --user disable --now host-ssh-krl-refresh.timer, as it is not
stopped when the package is removed.
On Windows there is an MSI build that includes both the GUI and CLI versions
and is the recommended option for Windows users. By default it installs to
Program Files and starts both the client and the OpenSSH Authentication
Agent at login. A silent install can change these with the INSTALLDIR,
START_ON_LOGIN=0 and START_SSH_AGENT=0 properties:
msiexec /i ssh-ca-client_<version>_windows_amd64.msi /qn INSTALLDIR="D:\Tools\SSH CA\" START_SSH_AGENT=0
An upgrade keeps the options the install used, unless they are given again.
MSIs up to 1.0.0 did not save them, so upgrading from one of those needs the
properties once more.
Verifying Releases
Each GitHub release includes a checksums.txt file listing the SHA-256
checksums of every release file, including the MSI, and a
checksums.txt.sigstore.json bundle that signs it. With
cosign
installed, download both files into the same directory as the release files
you want to check, then verify the signature and the checksums:
cosign verify-blob checksums.txt \
--bundle checksums.txt.sigstore.json \
--certificate-identity-regexp '^https://github.com/andrewheberle/ssh-ca-client/.github/workflows/release.yml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum --check --ignore-missing checksums.txt
The release files also have GitHub build attestations, which can be checked
with the GitHub CLI, replacing FILE with the
release file to check:
gh attestation verify FILE --repo andrewheberle/ssh-ca-client
Building From Source
CLI
go install github.com/andrewheberle/ssh-ca-client/cmd/ssh-ca-client-cli@latest
GUI
go install github.com/andrewheberle/ssh-ca-client/cmd/ssh-ca-client@latest
MSI
The MSI is built on Linux using wixl from msitools
0.106 or later (packaged as wixl and wixl-data on Debian 13 "trixie").
Build the Windows binaries with GoReleaser first, then the MSI:
goreleaser release --clean --snapshot --skip sign
templates/build-msi.sh "$(git describe --tags)" dist/ssh-ca-client.msi
Testing
Unit tests have no external dependencies:
go test -race ./...
End-to-end tests run the client against the published
Serverless SSH CA
package and require Node.js 24 or later and npm:
go test -tags e2e -race ./internal/e2e/...
The CA is run by its test server,
@andrewheberle/serverless-ssh-ca-testing,
which is released with the CA. The npm dependencies are installed on the first
run, which requires network access. The versions of the CA and test server
that are used are set in
internal/e2e/testdata/ca/package.json.
By default the CA runs on Node.js using the package's Node.js helpers. Set
E2E_CA_RUNTIME=workerd to run it under workerd, the Cloudflare Workers
runtime, with a local D1 database and Secrets Store via the Wrangler test
harness instead:
E2E_CA_RUNTIME=workerd go test -tags e2e -race ./internal/e2e/...
CI runs the tests under both runtimes.
To test against an unreleased version of the CA, set E2E_CA_PACKAGE to any
npm install spec, such as a tarball built from a checkout of
serverless-ssh-ca, and
E2E_CA_TESTING_PACKAGE to do the same for the test server. Either can be set
on its own:
# in serverless-ssh-ca
npm ci && npm run build -w packages/core -w packages/testing && npm pack -w packages/core -w packages/testing
# in ssh-ca-client
E2E_CA_PACKAGE=/path/to/andrewheberle-serverless-ssh-ca-X.Y.Z.tgz \
E2E_CA_TESTING_PACKAGE=/path/to/andrewheberle-serverless-ssh-ca-testing-X.Y.Z.tgz \
go test -tags e2e -race ./internal/e2e/...
Relative paths are resolved from internal/e2e, so absolute paths are
simplest. The next run without either variable reinstalls the pinned versions.
The CA repository calls the End-to-end tests
workflow with ca-ref and client-ref inputs to test its changes against a
client git ref (or latest, the latest GitHub release) before publishing.
When ca-ref is set, the CA's OpenAPI schema is also checked with
oasdiff for changes that would break the
client under test.
API Schema
The client's API code in internal/pkg/api is generated from
openapi.json, which is a copy of the schema shipped in the pinned CA package.
CI fails if they differ, so after changing the CA version update the schema and
regenerate the code:
npm ci --prefix internal/e2e/testdata/ca
npm run sync-schema --prefix internal/e2e/testdata/ca
Configuration
The client requires the IdP and CA details. issuer, client_id, ca_url and
trusted_ca are required, and scopes and redirect_url are optional. The
optional ones are shown with their defaults:
# Required
issuer: https://idp.example.com/
client_id: OIDC Client ID
ca_url: https://ca.example.com/
trusted_ca: ecdsa-sha2-nistp256 AAAAE2VjZ...
# Optional, shown with their defaults
scopes: ["openid", "email", "profile"]
redirect_url: http://localhost:3000/auth/callback
On Linux/BSD/Darwin this is a YAML file, by default
/etc/serverless-ssh-ca/config.yml, however this may also be overidden using
the --config command line flag.
Keys must be spelt exactly as shown, in lower case (registry value names on
Windows are case insensitive). An unknown key is an error rather than being
ignored, so a misspelt key cannot silently leave a setting at its default. Values must have the type shown: scopes is a list, and a
client_id that YAML would read as a number must be quoted. ca_url and
issuer must use https unless the host is localhost or a loopback address,
and trusted_ca holds exactly one key.
On Windows both the GUI and CLI read their configuration from the registry
under SOFTWARE\Andrew Heberle\Serverless SSH CA Client, with --config
selecting the hive to use: HKLM (the default) or HKCU. Any configuration
set via Group Policy is applied over this.
The registry value names match the YAML keys above:
| Value name |
Type |
issuer |
REG_SZ |
client_id |
REG_SZ |
scopes |
REG_MULTI_SZ |
redirect_url |
REG_SZ |
ca_url |
REG_SZ |
trusted_ca |
REG_SZ |
Either the registry key or the Group Policy may be absent, as long as all
required settings are set by one of them.
Note: The ADMX/ADML files before v0.26.0 set values with different names
(such as ClientID), which are not read. Import the current ADMX/ADML files
and configure the policies again. See
Values left by old Group Policy templates
to remove the old values.
Note: Previous versions of the GUI read a YAML configuration file on
Windows. This file is no longer used, so its settings must be moved to the
registry or Group Policy.
The redirect_url must use http as the client listens on this address during
an interactive login.
Add offline_access to scopes if your IdP issues refresh tokens for it, as
most do. With a refresh token the client can refresh certificates without a
login, and the GUI refreshes them in the background. Without one, each new
certificate needs a login.
On Windows these system level options can be set using Group Policy via the
ADMX/ADML files in the policy sub-directory of this repository. These files
are also installed by the MSI into a policy sub-directory of the install
location (by default C:\Program Files\Serverless SSH CA Client\policy).
Each setting must have a value when its policy is enabled. An empty registry
value, in either the configuration or the Group Policy key, is treated as not
set.
The ADMX namespace includes the version of the release that last changed the
templates, currently SSHCAClient_v1.0.0 (see
ADR 0003).
Intune can't import a changed template under a namespace it already has, so
after a release that changes the templates, import them as a new template in
Intune. The registry value names don't change, so settings already applied
keep working.
The GUI and CLI store persistent user data such as the users private key,
refresh token (if available) and certificate in the operating system keyring
(Windows Credential Manager, macOS Keychain or a Secret Service provider such
as gnome-keyring on Linux/BSD). The GUI and CLI share this data, so a key
generated or certificate requested by one is available to the other.
This allows the use of a shared/system configuration that defines the OIDC and
SSH CA configuration with user specific data kept seperate.
Values left by old Group Policy templates
Replacing the ADMX/ADML files doesn't remove what the old ones set. A GPO
keeps the old values (shown as "Extra Registry Settings" in a Group Policy
Management report) and applies them again at every refresh, so deleting them
from a machine's registry doesn't last.
The client ignores these values under
HKLM\SOFTWARE\Policies\Serverless SSH CA Client, which the ADMX before
v0.26.0 set, and logs a warning naming them each time it loads its
configuration (the GUI logs to the Windows Event Log by default):
ClientID
RedirectURL
CertificateAuthorityURL
TrustedCertificateAuthority
The old Issuer and Scopes values have the same names as current ones, so
they are still read. Any other unknown value under the Policy key is an error,
which names the key it is in.
To remove the old values from a GPO, run this on a machine with the Group
Policy Management tools, then refresh Group Policy on the clients
(gpupdate), which removes them from the registry:
Remove-GPRegistryValue -Name "<GPO name>" `
-Key "HKLM\Software\Policies\Serverless SSH CA Client" `
-ValueName ClientID, RedirectURL, CertificateAuthorityURL, TrustedCertificateAuthority
Check the old Issuer and Scopes values too: if the GPO still sets them,
they apply over the configuration like any other policy.
In Intune, delete the profiles that use the old imported template. If the
values are still on a device afterwards, delete them from the registry there,
as nothing applies them any more.
As A Snap
The snap is configured with snap options, set with snap set, which is the
only supported way to configure it:
sudo snap set ssh-ca-client issuer=https://idp.example.com/
sudo snap set ssh-ca-client client-id="OIDC Client ID"
sudo snap set ssh-ca-client ca-url=https://ca.example.com/
sudo snap set ssh-ca-client trusted-ca="ecdsa-sha2-nistp256 AAAAE2VjZ..."
# Optional, as these are the defaults
sudo snap set ssh-ca-client scopes=openid,email,profile
sudo snap set ssh-ca-client redirect-url=http://localhost:3000/auth/callback
The above commands would generate the same configuration as the YAML example
above.
issuer, client-id, ca-url and trusted-ca are required. Once all four
are set, the snap writes its configuration from the snap options, replacing any
configuration file there, and writes it again whenever an option changes and
when the snap is refreshed. Until then the configuration is left as it is, so
the options can be set one at a time. scopes is a comma separated list, and
scopes and redirect-url use the defaults above when unset. A value
containing a newline or another control character is rejected.
Configuration Privacy/Security
Sensitive data such as the users SSH private key and the OIDC refresh token are
stored in the operating system keyring, which protects them using the
platforms own mechanisms. A keyring/secret service must therefore be available
to use the GUI and the login, generate, show and revoke sub-commands of
the CLI. The host and revoke --host sub-commands do not use the keyring.
Note: Previous versions stored this data in a user configuration file
(user.yml), protected using DPAPI on Windows or a key held in the keyring on
other platforms, and the CLI also supported a --keyfile option. This data is
not migrated, so after upgrading generate a new private key (via the GUI
"Generate" menu item or ssh-ca-client-cli generate) and request a new
certificate.
| Platform |
Architectures |
Installed with |
| Linux |
amd64, arm64 |
The deb (APT) package or the snap; a release archive (.tar.gz) |
| Windows |
x64 |
The MSI, with Group Policy settings from policy/; a release archive (.zip) |
| Windows |
arm64 |
A release archive (.zip) only |
The deb, snap and MSI are the recommended ways to install the client. The
release archives are supported on the same platforms, but do not include the
systemd units or the Group Policy templates.
On Windows, the .zip doesn't register the Event Log source that the GUI logs
to by default. Without it, the events are still written, but Event Viewer can't
show their descriptions. Either run the GUI with --log-file to log to a file
instead, or register the source once, as an administrator, with the same values
the MSI uses:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Serverless SSH CA Client" /v EventMessageFile /t REG_EXPAND_SZ /d "%SystemRoot%\System32\EventCreate.exe" /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Serverless SSH CA Client" /v TypesSupported /t REG_DWORD /d 7 /f
macOS and BSD are not supported platforms: the CLI can be built from source but
is untested, and the GUI is left out of the build, as it is only available on
Linux and Windows. Bug reports are welcome, but no support is promised.
Both hosts (sshd) and user machines (ssh and ssh-agent) need OpenSSH 8.0
or later. On Windows this is the built-in OpenSSH Client and OpenSSH Agent. From
OpenSSH 9.8, sshd must be reloaded to present a renewed host certificate, see
Host Certificates and
ADR 0002.
Releases are built with the Go toolchain pinned by the toolchain line in
go.mod, see
ADR 0001 and
Building From Source.
Requirements
The client needs a CA that serves /api/v4, such as serverless-ssh-ca 1.0.0
or later.
Regardless of the version being run there must be a running ssh-agent to handle
private keys, certificates and authentication to your SSH client of choice.
On Windows this requires the OpenSSH Agent service to be set to Manual start
and ssh-agent.exe must be started on login for your user.
On Linux ssh-agent is often started as part of your normal login process and in
addition the secure storage of sensitive material requires the users login keyring
to be unlocked, which is usually the default in most desktop environments.
Each time a certificate is added to the SSH agent, any expired user certificates
issued by the configured CA are removed from the agent. This matters on Windows,
where the agent keeps certificates across reboots with no lifetime, so the
certificate for a replaced private key would otherwise stay in the agent after
it expires. Plain keys, host certificates, certificates from other CAs and
certificates that have not expired are left in place.
Running via the CLI
The client can be run in the following ways:
User Certificates
Generating a private key
To generate a new private key, run as follows:
ssh-ca-client-cli generate
Show Existing Key/Public Key/Certificate
ssh-ca-client-cli show [--private|--certificate [--git]|--public]
By default the client only displays the users public key, however the
--private and --certificate options may be provided. The --git option
outputs the certificate in a format suitable for signing git commits.
Requesting a Certificate
To request a certificate from the CA, run the client as follows:
ssh-ca-client-cli login
This will trigger an interactive OIDC authentication flow via the users
web browser to obtain an authentication token, which will be used to perform
a request to the CA for a SSH certificate.
If a refresh token was provided by the OIDC IdP, this will be used initially to
attempt a renewal of the authentication token so the process can avoid an
interactive authentication flow.
Host Certificates
The CLI can be used to request certificates for pre-existing SSH host keys using the
host sub-command as follows:
# request certificates
ssh-ca-client-cli host
# renew existing certificates
ssh-ca-client-cli host --renew
Overview
Requesting host certificates is restricted to users that have been explicitly
allowed to do this in the configuration of the CA.
By default the CLI will attempt to request certificates for the following keys,
in this order:
- /etc/ssh/ssh_host_ed25519_key
- /etc/ssh/ssh_host_ecdsa_key
- /etc/ssh/ssh_host_rsa_key
Certificates will be saved as KEYNAME-cert.pub and can be used by sshd by
adding the following to your sshd_config (or /etc/ssh/sshd_config.d/*.conf):
HostCertificate /etc/ssh/ssh_host_ed25519_key-cert.pub
HostCertificate /etc/ssh/ssh_host_ecdsa_key-cert.pub
HostCertificate /etc/ssh/ssh_host_rsa_key-cert.pub
To ensure your ssh client trusts hosts with certificates issued by your CA you
must add the following to your ~/.ssh/known_hosts file, or to
/etc/ssh/ssh_known_hosts to trust the CA for all users of the machine:
@cert-authority *.example.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdH...
The value of *.example.com sets what hosts should be trusted when they present
a certificate signed by the specified CA public key (ie the
ecdsa-sha2-nistp256... value). It is also possible to have * to trust the
CA for all hosts.
By default the CLI will request a certificate with the hostname of the system
you are running the command on, however it is recommended to include the FQDN
and IP addresses of the host using the --principals option as follows:
ssh-ca-client-cli host --principals hostname,hostname.example.com,192.168.1.1,etc
The CA refuses principals that are empty, or that contain wildcard or pattern
characters (*, ?, ! or ,), whitespace or control characters, as OpenSSH
would read them as patterns or lists. A principal of * would otherwise make the
certificate valid for every host. Who may request host certificates is set in
the configuration of the CA.
Renewals
If the host possesses a valid (ie unexpired) certificate issued by the CA the
renewal of the certificate can be completed without requiring an interactive
SSO process via OIDC.
The renewed certificate will be issued with identical principals and extensions
as the current certificate with renewals being skipped unless the certificate
has less than 50% of validity left (based on the default of 30-days validity).
Without --key, a renewal covers the default Ed25519, ECDSA and RSA host keys,
and skips any of them that have no certificate, so a host that only certified
some of its keys renews those without failing. The renewal fails if none of
them has a certificate. A key given with --key must have a certificate to
renew.
A renewal revokes the certificate it replaces. From OpenSSH 9.8, sshd only
reads host certificates when it starts or is reloaded, so until it is reloaded
it keeps presenting the previous, revoked certificate, and then an expired one.
OpenSSH 9.7 and earlier read the certificate files for each connection, so they
present a renewed certificate straight away.
The --reload-command option sets a command, run with /bin/sh -c, that
reloads sshd. It runs once, after all keys have been processed, if any host
certificate was written, even if another key failed or the command was
interrupted, and is not run when no certificate was due for renewal. If the
reload command fails, the host command fails, but the certificates that were
written are kept. Without --reload-command a reminder to reload sshd is
logged instead.
ssh-ca-client-cli host --renew --reload-command "systemctl try-reload-or-restart ssh.service"
Example systemd unit files are located in the systemd directory and these are
installed by the DEB package so renewals can be enabled as follows if you have
installed via the package:
sudo systemctl enable --now host-ssh-certificate-renewal.timer
The renewal unit reloads ssh.service when a certificate was renewed, which is
the name of the OpenSSH server unit on Debian and Ubuntu. If you copy the unit
to RHEL or a derivative, change it to sshd.service.
The units run sandboxed. The two system units can only write to /etc/ssh,
where host certificates and the user KRL are written. If a drop-in renews keys
or writes a KRL elsewhere, or the reload command writes outside /etc/ssh,
add the directory to the drop-in, for example:
sudo systemctl edit host-ssh-certificate-renewal.service
[Service]
ReadWritePaths=/srv/ssh
The reload command runs inside the renewal unit's sandbox, which still allows
it to use sudo, capabilities and runtimes that compile code at run time. The
user unit only restricts system calls and address families, as other
sandboxing needs unprivileged user namespaces, which some systems disable.
Command Line Options
The options of the host sub-command, with their defaults, are listed in
ssh-ca-client-cli host, which is generated
from the CLI. In particular:
--life sets the lifetime of a new certificate, which defaults to 30 days
(720h).
--renew-at sets when --renew renews a certificate, as the fraction of its
lifetime that has passed. The default of 0.5 renews once half of the
lifetime has passed, and 0.8 once four fifths have.
The --addr option from previous versions has been removed as the listen
address for the OIDC auth flow is now taken from the configured redirect_url.
Example
The following example shows the initial request for SSH host certificates and a subsequent renewal.
This example assumes you are working from your local device and requesting host certificates for a remote system without a web browser, so port 3000 will be forwarded to allow the initial OIDC authentication process to be handled locally:
# Initially connect to your host and forward port 3000 locally
ssh -L 3000:localhost:3000 admin@remotehost
# Request the initial certificate(s) with three principals (hostname, FQDN and IP address)
ssh-ca-client-cli host --principals remotehost --principals remotehost.example.com,192.168.1.10
# Visit the URL displayed on the console using your local browser (eg http://localhost:3000/auth/login) and authenticate against the IdP
# Reload sshd so it presents the new certificate(s), after adding HostCertificate to sshd_config
sudo systemctl reload ssh
# Some time later perform a renewal, reloading sshd if a certificate was renewed
ssh-ca-client-cli host --renew --reload-command "systemctl try-reload-or-restart ssh.service"
Key Revocation Lists
The krl sub-command downloads a key revocation list (KRL) from the CA, verifies
its signature using the trusted_ca public key and writes it to a file that
sshd or ssh can use to reject revoked certificates. A downloaded KRL is not
written if it is older than the existing file, and the file is left as it is
when the KRL has not changed.
The CA signs the certificate type (user or host) into each KRL, so a KRL
for the other type is refused rather than un-revoking certificates. CA 1.0.2
and earlier don't sign the type, so their KRLs are accepted until a KRL that
names its type has been written to the file. After that, a KRL without a type
is refused, as it comes from a downgraded CA or is an old KRL replayed (see
ADR 0005).
If the CA was downgraded on purpose, remove the file so the next KRL replaces
it.
To have sshd reject users that present a revoked certificate, first write the
user KRL:
sudo ssh-ca-client-cli krl --out /etc/ssh/revocation_list
Then add the following to your sshd_config (or /etc/ssh/sshd_config.d/*.conf)
and reload sshd:
RevokedKeys /etc/ssh/revocation_list
The KRL must be written before RevokedKeys is set, as sshd refuses all
public key authentication if the file cannot be read.
Example systemd unit files are located in the systemd directory and these are
installed by the DEB package, so the user KRL can be refreshed hourly as follows
if you have installed via the package:
sudo systemctl enable --now user-ssh-krl-refresh.timer
To have ssh reject hosts that present a revoked certificate, write the host
KRL with --host and set RevokedHostKeys in your ~/.ssh/config:
ssh-ca-client-cli krl --host --out ~/.ssh/revocation_list
RevokedHostKeys ~/.ssh/revocation_list
The DEB package also installs a systemd user unit, so the host KRL can be
refreshed hourly for your user as follows:
systemctl --user enable --now host-ssh-krl-refresh.timer
The timer is not enabled by default, so each user that wants it enables it
for themselves. It only runs while the user is logged in, and a refresh missed
while they were logged out runs when they next log in. To keep the KRL
refreshed while the user is logged out, enable lingering for them:
sudo loginctl enable-linger <user>
See docs/ssh-ca-client-cli-krl.md for all
options.
Revoking Certificates
The revoke sub-command revokes a certificate at the CA, which adds it to the
KRL. Revocation cannot be undone and is only available via the CLI, not the GUI.
# revoke the current user certificate
ssh-ca-client-cli revoke
# revoke the current host certificates
sudo ssh-ca-client-cli revoke --host
As sshd keeps presenting a revoked host certificate until it is reloaded
(OpenSSH 9.8 and later), revoke --host also accepts --reload-command, which
is run once if any host certificate was deleted.
The certificates to be revoked are shown and confirmation is asked for, which
can be skipped with --yes (required when there is no terminal). Revocation
uses a proof of possession of the private key the certificate was issued for, so
no login is needed. Once revoked, the certificate is deleted so a new certificate
can be requested with login or host. A user certificate is also removed from
the SSH agent, while host certificates are not held in an SSH agent so it is not
contacted with --host.
Revoking host certificates is not available on Windows or when installed as a
snap.
A revoked certificate is only rejected by sshd or ssh once they use a KRL
that includes it (see Key Revocation Lists).
Revoking the current certificate does not revoke any previous certificates
issued for the same private key that have not yet expired, such as the
certificate that was replaced by a renewal. These can be revoked by serial
number with --serial:
ssh-ca-client-cli revoke --serial 12345678901234567890
# with --host only a single --key may be given
sudo ssh-ca-client-cli revoke --host --key /etc/ssh/ssh_host_ed25519_key --serial 12345678901234567890
If a private key may have been compromised, as well as revoking its
certificates generate a new private key (ssh-ca-client-cli generate --force)
or new host keys before requesting a new certificate.
See docs/ssh-ca-client-cli-revoke.md for
all options.
As a GUI
The GUI requests and refreshes user certificates. Revoking a certificate is only
available via the CLI (see Revoking Certificates).
Once less than --refresh-before of the certificate's lifetime remains, the
GUI refreshes it in the background, retrying until it succeeds. If a refresh
needs a login, for example because the refresh token expired or the identity
provider doesn't issue one, the GUI sends a "Login Needed" notification once
for that certificate, saying how long is left. Until the certificate expires
or a new one is obtained, the tray shows the warning icon and "Login needed",
and the menu item becomes "Log in". If the certificate expires without being
refreshed, a "Certificate Expired" notification is sent.
The GUI supports the following command line flags:
| Flag |
Type |
Description |
--life |
time.Duration |
Lifetime of SSH certificate |
--refresh-before |
time.Duration |
Refresh the certificate once less than this, or half its lifetime, remains |
--config |
string |
Configuration file (Linux) or registry hive, HKLM or HKCU (Windows) |
--log |
string |
Log directory, which contains tray.log and crash.log |
--log-file |
bool |
Log to a file instead of the Windows Event Log (Windows only) |
--json |
bool |
Enable JSON logging |
--debug |
bool |
Enable debug logging |
--disable-proxy |
bool |
Disable proxying of PuTTY Agent (pageant) requests (Windows only) |
--add-on-start |
bool |
Add current key and certificate (if valid) to SSH agent on start |
--version |
bool |
Show version and exit |
The defaults are as follows:
| Flag |
Default (Windows) |
Default (Linux) |
--life |
24h |
24h |
--refresh-before |
1h |
1h |
--config |
HKLM |
/etc/serverless-ssh-ca/config.yml |
--log |
%LOCALAPPDATA%\Serverless SSH CA Client\log |
~/.local/state/serverless-ssh-ca/log |
--log-file |
false |
n/a (always logs to a file) |
--disable-proxy |
false |
n/a (always disabled) |
--add-on-start |
true |
true |
The --addr and --user options from previous versions have been removed. The
listen address for the OIDC auth flow is taken from the configured
redirect_url and user data is stored in the operating system keyring.
On Linux the default log directory is $XDG_STATE_HOME/serverless-ssh-ca/log
if $XDG_STATE_HOME is set, and $SNAP_USER_COMMON/log when running as a
snap. Previous versions logged to %APPDATA%\Serverless SSH CA Client\log
(Windows) or ~/.config/serverless-ssh-ca/log (Linux), and any logs there are
no longer used.
Attributions
The icons used by the client are made by Freepik from www.flaticon.com.