Giter VIP home page Giter VIP logo

sshaddm's Introduction

SSHADDM

ssh-add multi-keys bash script

VERSION ⚠️

❗ 0️⃣.1️⃣-DEV ❗ 💥 This is a DEV version, so NO STABLE version 🚧

This bash script 'sshaddm' help you to add multiples keys to your ssh-agent with only one command.

It run correctly if you have the same passphrase for all yours keys you want to add in one time !!

In next version I'll add the possibility to add keys by passphrase's group ...

Take a look at TODO.md ;)

REQUIREMENTS

OPERATING SYSTEM

Tested on Ubuntu/Debian

DEPENDS

  • openssh-client

how verify :
dpkg -s openssh-client
how install (But Normally you would not be here if you don't know what is openssh-client and how it runs ;)) :
sudo apt-get install openssh-client

INSTALL

SSHADDM-DIR-NAME="The name you want for sshaddm directory"
git clone https://github.com/massipasquesi/sshaddm.git $SSHADDM-DIR-NAME

if you want sshaddm works everywhere,
you can create a symlink to sshaddm.sh in /usr/local/bin or /usr/bin (depends on your $PATH environment variable)

sudo ln -s $SSHADDM-DIR-NAME/sshaddm.sh /usr/local/bin/sshaddm

RUN

cd $SSHADDM-DIR-NAME/
./sshaddm.sh

or if you made the symlink
you can run it from everywhere with simply sshaddm command :

sshaddm

When you run sshaddm for the first time you'll invited to set configuration variables from the prompt.

You can set variables manually by copying 'define.example' and naming it 'define.rc' into $SSHADDM-DIR-NAME
and set variables like explained in this CONFIG section below.

Everytime you want to change configuration variables you can do it manually or running 'setup.sh'

sshaddm -s
# OR
sshaddm --setup
# OR
cd $SSHADDM-DIR-NAME && ./setup.sh

CONFIG

define $keys_path : path to yours ssh_keys. No trailing slashs at the end of the path !

# exemple : all your keys in "your home"/.ssh directory
keys_path="${HOME}/.ssh"

If all your keys have the same prefix -> set $keys_prefix. If not set to empty string : ""

# exemple : all your keys's names are prefixed by "id_dsa_" :
keys_prefix="id_dsa_"
# exemple : keys's names have differents prefix or they don't have any :
keys_prefix=""

Define $keys_names : list ok keys's names separated by a space. If you setted $keys_prefix remove it from key's name

# exemple : all your keys's names have the same prefix $keys_prefix like :
# id_dsa_firstkey, id_dsa_secondkey, id_dsa_thirdkey
keys_names="firstkey secondkey thirdkey"
# exemple : keys's names have differents prefix or they don't have any like :
# mykey, another_key, my_prefered_key,
keys_names="id_dsa_mykey another_key my_prefered_key"

sshaddm's People

Contributors

massipasquesi avatar

Watchers

James Cloos avatar  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.