https://github.com/WillFantom/sshare
Quickly share curlable links to your SSH pub keys (from agent,github,file,raw) 🔑
https://github.com/WillFantom/sshare
authorized-keys ssh-agent ssh-keys transfer-sh transfersh
Last synced: 4 months ago
JSON representation
Quickly share curlable links to your SSH pub keys (from agent,github,file,raw) 🔑
- Host: GitHub
- URL: https://github.com/WillFantom/sshare
- Owner: WillFantom
- License: mit
- Created: 2022-12-11T09:45:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T16:28:45.000Z (10 months ago)
- Last Synced: 2024-08-01T13:28:53.400Z (7 months ago)
- Topics: authorized-keys, ssh-agent, ssh-keys, transfer-sh, transfersh
- Language: Go
- Homepage:
- Size: 98.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSHare      
Quickly share SSH keys from your agent as `curl`able links! Use the `sshare` TUI to easily select keys from an SSH agent and automatically generate a [`transfer.sh`](https://transfer.sh) upload that can easily be added to an authorized key file via `curl`.
---
## Install
- **Linux**
- Download the appropriate version for your system from the [GitHub release page](https://github.com/WillFantom/sshare/releases)
- Move the `sshare` binary to a directory in your `PATH`
- **MacOS**
- Download and install via Homebrew:
```
brew install willfantom/tap/sshare
```## Usage
Simply run: `sshare`
Sensible defaults are used, such as connecting to the SSH agent as defined by the `SSH_AUTH_SOCK` environment variable.
- To include keys that are not found in your agent, you can specify a file containing the public key with the `-f` flag (and can be specified multiple times):
```
sshare -f ~/.ssh/id_rsa.pub
```- An SSH agent socket path other than the one found in `SSH_AUTH_SOCK` can be provided using the `-a` flag:
```
sshare -a /tmp/ssh-XXXXXXanCbmG/agent.8
```- Add keys from a generated link to an `authorized_keys` file:
```
curl --fail-with-body >> ~/.ssh/authorized_keys
```- Uploads can be deleted by either:
- Opening the downloaded link in a browser and deleting the key using the given deletion code
- By running the `delete` command of `sshare`:
```
sshare delete
```
- Or by running:
```
curl -X DELETE /
```- Also provide your GitHub SSH keys as options for keys to share:
```
sshare -g ""
```---
```
Share your public SSH keys found in your agent via curl-able transfer.sh links.Usage:
sshare [flags]
sshare [command]Available Commands:
completion Generate the autocompletion script for the specified shell
delete Delete an uploaded authorized_keys file
help Help about any commandFlags:
-a, --agent string path to the target ssh agent socket ($SSH_AUTH_SOCK) (default "~/.1password/agent.sock")
-g, --github-token string github token with permission to read ssh keys
-h, --help help for sshare
-k, --key stringArray additional keys to include in the generated authorized_keys
-f, --key-file stringArray additional key file(s) to include in the generated authorized_keys
-d, --max-days int number of days that the content will remain available via transfer.sh (default 2)
-m, --max-downloads int maximum number of times any content shared can be downloaded (default 10)
-p, --passphrase string passphrase for the ssh agentUse "sshare [command] --help" for more information about a command.
```