Hardware-based SSH/PGP agent
Go to file
2015-09-02 15:15:06 +03:00
trezor_agent rename package name to trezor_agent 2015-08-21 21:22:26 +03:00
.gitignore Initial commit 2015-06-06 17:42:48 +03:00
.pylintrc pylint: disable "locally-disabled" warning 2015-08-17 09:33:18 +03:00
.travis.yml travis: test on Python 3.4 2015-08-24 16:07:39 +03:00
LICENSE Initial commit 2015-06-06 17:42:48 +03:00
README.md README: update SSH pubkey handling demo 2015-09-02 15:15:06 +03:00
setup.py rename package name to trezor_agent 2015-08-21 21:22:26 +03:00
tox.ini tox: remove unused dependency 2015-08-21 21:24:46 +03:00

Using Trezor as a hardware SSH agent

Build Status

Screencast demo usage

Demo

Installation

First, make sure that the latest trezorlib Python package is installed correctly:

$ pip install Cython trezor

Then, install the latest trezor_agent package:

$ pip install trezor_agent

Public key generation

Run:

/tmp $ trezor-agent ssh.hostname.com -v > hostname.pub
2015-09-02 15:03:18,929 INFO         getting "ssh://ssh.hostname.com" public key from Trezor...
2015-09-02 15:03:23,342 INFO         disconnected from Trezor
/tmp $ cat hostname.pub
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGSevcDwmT+QaZPUEWUUjTeZRBICChxMKuJ7dRpBSF8+qt+8S1GBK5Zj8Xicc8SHG/SE/EXKUL2UU3kcUzE7ADQ= ssh://ssh.hostname.com

Append hostname.pub contents to ~/.ssh/authorized_keys configuration file at ssh.hostname.com, so the remote server would allow you to login using the corresponding private key signature.

Usage

Run:

/tmp $ trezor-agent ssh.hostname.com -v -c
2015-09-02 15:09:39,782 INFO         getting "ssh://localhost" public key from Trezor...
2015-09-02 15:09:44,430 INFO         please confirm user "roman" login to "ssh://localhost" using Trezor...
2015-09-02 15:09:46,152 INFO         signature status: OK
Linux lmde 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Sep  1 15:57:05 2015 from localhost
~ $

Make sure to confirm SSH signature on the Trezor device when requested.