Skip to content

babarot/ssh-keyreg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ssh-keyreg

ssh-keyreg is command-line method or programmatically add ssh key to github.com user account.

Description

Is there a way to identify with a username and password to github.com servers for the purpose of adding an ssh key to the github user account? So far everything I've read suggests that a user's ssh key must be added via the web GUI. I'm looking for the method or process of adding a key via a command line interface or else a bash/ansible/something script. via command line method or programmatically add ssh key to github.com user account

DEMO:

DEMO

Features

  • command-line method add ssh key to github.com
  • support bash/zsh

Usage

$ ssh-keyreg --help
usage: ssh-keyreg [-h|--help][[-d|--desc <desc>][-u|--user <user[:pass]>][-p|--path <path>]] [github|bitbucket]
    command line method or programmatically add ssh key to github.com user account

options:
    -h, --help   show this help message and exit
    -d, --desc   description of registration
    -u, --user   username and password (user:pass)
    -p, --path   path of public key

MIT @b4b4r07 <https://github.com/b4b4r07>

For example, this is a basical usage below.

$ cd ~/.ssh; ssh-keygen
$ ssh-keyreg --path id_rsa.rub github

Installation

Using zplug for zsh user

$ zplug "b4b4r07/ssh-keyreg", as:command, use:bin
$ zplug install

zplug-free install

To install this tool without zplug:

$ sudo sh -c "curl https://raw.githubusercontent.com/b4b4r07/ssh-keyreg/master/bin/ssh-keyreg -o /usr/local/bin/ssh-keyreg && chmod +x /usr/local/bin/ssh-keyreg"

ssh-keyreg is a shell script, so put it somewhere and make sure it's added to your $PATH.

License

MIT © BABAROT (a.k.a. b4b4r07)

About

A CLI tool add ssh key to github.com user account

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages