-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot sign certificate with Trezor as SSH CA #491
Comments
Fixes #491. Usage example: ```bash trezor-agent -v 'SSH Certificate Authority' > /path/to/trezor-ca.pub echo 'TrustedUserCAKeys /etc/ssh/trezor-ca.pub' | sudo tee -a /etc/ssh/sshd_config ssh-keygen -t ed25519 -f user-key trezor-agent -v 'SSH Certificate Authority' -- \ ssh-keygen -Us trezor-ca.pub -V '+10m' -I user-id -n user user-key.pub ssh user@localhost -o CertificateFile=user-key-cert.pub -i user-key ```
Fixes #491. Usage example: ## generate TREZOR-based SSH CA public key $ trezor-agent -v 'SSH Certificate Authority' > /etc/ssh/trezor-ca.pub $ echo 'TrustedUserCAKeys /etc/ssh/trezor-ca.pub' | sudo tee -a /etc/ssh/sshd_config $ sudo systemctl restart ssh ## generate user-specific SSH key and certify it using trezor-agent $ ssh-keygen -t ed25519 -f user-key $ trezor-agent -v 'SSH Certificate Authority' -- \ ssh-keygen -Us trezor-ca.pub -V '+10m' -I user-id -n user user-key.pub ... Signed user key user-key-cert.pub: id "user-id" serial 0 for user valid from 2024-11-23T20:25:00 to 2024-11-23T20:36:27 ## use the certificate to login ssh -v user@localhost -o CertificateFile=user-key-cert.pub -i user-key ... debug1: Will attempt key: user-key-cert.pub ED25519-CERT SHA256:xdbgtQmUs5tUNf04f4Y3oQl5LGdBAMVjCH63R6EHH5Y explicit debug1: Will attempt key: user-key ED25519 SHA256:xdbgtQmUs5tUNf04f4Y3oQl5LGdBAMVjCH63R6EHH5Y explicit ... debug1: Offering public key: user-key-cert.pub ED25519-CERT SHA256:xdbgtQmUs5tUNf04f4Y3oQl5LGdBAMVjCH63R6EHH5Y explicit debug1: Server accepts key: user-key-cert.pub ED25519-CERT SHA256:xdbgtQmUs5tUNf04f4Y3oQl5LGdBAMVjCH63R6EHH5Y explicit Authenticated to localhost ([::1]:22) using "publickey". ...
@movefasta could you please try #493? |
Thank you very much.
but my old Trezor S still view it on device screen as SSH login (same as sign git commit or tag) |
Indeed, currently TREZOR firmware is signing the same blob passed from ssh-agent protocol (via trezor-agent/libagent/ssh/client.py Lines 51 to 52 in e06f913
|
Device: Trezor Model T
OS: NixOS 24.11.20241015.7881fbf (Vicuna)
Versions: trezor-agent=0.12.0, libagent=0.15.0
When i try to sign file it works fine:
If i try to sign pubkey to create certificate with SSH libagent return EOFError:
The text was updated successfully, but these errors were encountered: