An SSH Certificate Authority with a simple web interface and easy-to-use command line tool
- Create .env file in server with
SSH_KEY,JWT_PRIVATE,JWT_PUBLIC,DOMAIN,DATABASE_URL,HOST_VALIDITY_SECONDS, andCLIENT_VALIDITY_SECONDS - Build Server
- Apply database migrations with
yarn workspace server prisma migrate deploy - Upload server files to cdn (or local server) of choice
yarn startthe server
Before applying migrations to an existing database, resolve duplicate User.email
values and duplicate non-null Host.fingerprint values. The hardening migration
adds unique constraints for both.
- run
go install github.com/sshca/sshca/sshca-client@latest - Add
CertificateFile /tmp/sshca-key.pubto~/.ssh/config - Run an initial password login to enroll your public key and generate a certificate:
sshca-client login --server https://sshca.example.com --email [email protected] --role user@example-host --keyFile ~/.ssh/id_rsa.pub --certFile /tmp/sshca-key.pub - After the first password login has enrolled your key fingerprint, refresh a certificate without a password:
sshca-client genCert --server https://sshca.example.com --role user@example-host --privateKeyFile ~/.ssh/id_rsa --certFile /tmp/sshca-key.pubIf--keyFileis omitted, the client reads the public key from--privateKeyFile + ".pub". - SSH into target server
git clone https://github.com/sshca/sshca.git- Create .env file in server with
SSH_KEY,JWT_PRIVATE,JWT_PUBLIC,DOMAIN, andDATABASE_URL - Install all dependancies (
yarnin server and web directories) - Build server
yarn buildNote: NODE_ENV must be set! - Apply database migrations with
yarn workspace server prisma migrate deploy - Start server
yarn start - Start webserver
yarn start - Webserver will be started on port 3000
