https://github.com/philips/ssh-agent-tool
Swiss army knife for SSH agents
https://github.com/philips/ssh-agent-tool
Last synced: 11 months ago
JSON representation
Swiss army knife for SSH agents
- Host: GitHub
- URL: https://github.com/philips/ssh-agent-tool
- Owner: philips
- Created: 2015-10-20T20:42:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-20T20:44:58.000Z (over 10 years ago)
- Last Synced: 2025-04-08T18:54:35.169Z (about 1 year ago)
- Language: Go
- Size: 125 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ssh-agent OAUTH 2.0 bridge
Nearly everyone who does server infrastructure has an ssh key. This is a strong
public-key based identity. Not only that but it is often the only identity that
is available when people remote into a host via ssh thanks to "ssh-agent
forwarding".
This tool lets you play with the ssh-agent and shows how it can be used to sign
and verify challenge-responses. Eventually I want to use this code as an
identity exchange from say SSH public key to OAUTH 2.0 JWT.
## Manual
### List Public Keys
```
$ ssh-agent-tool list-keys
00: ssh-rsa AAAAB3NzaC1yc2EAAAA...y+1EoNzsPkY2aw== /Users/philips/.ssh/id_rsa
01: ssh-rsa AAAAB3NzaC1yc2EAAAA...oYVfmKAMjmKkV /Users/philips/.ssh/id_rsa_old
```
### Sign
```
$ ssh-agent-tool sign $(echo foobar | base64)
00: ssh-rsa fStlJeCQW8...Glu5ZHNuc=
01: ssh-rsa gtLeSrdor...rgQb9Qp/SDw==
```
### Challenge Verify
```
$ ./ssh-agent-tool verify $(echo foobar | base64) ssh-rsa fStlJeCQW8...Glu5ZHNuc=
00: verified: true
01: verified: false
$ ./ssh-agent-tool verify $(echo foobar | base64) ssh-rsa gtLeSrdor...rgQb9Qp/SDw==
00: verified: false
01: verified: true
```