Coder Social home page Coder Social logo

sshare's Introduction

SSHare    GitHub release (latest SemVer)  GitHub Workflow Status

Quickly share SSH keys from your agent as curlable links! Use the sshare TUI to easily select keys from an SSH agent and automatically generate a 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
    • 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 <downloadURL> >> ~/.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 <downloadURL> <deletionCode>
      
    • Or by running:
      curl -X DELETE <downloadURL>/<deletionCode>
      
  • Also provide your GitHub SSH keys as options for keys to share:

    sshare -g "<a github access token with read ssh keys permission>"
    

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 command

Flags:
  -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 agent

Use "sshare [command] --help" for more information about a command.

sshare's People

Contributors

dependabot[bot] avatar willfantom avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.